Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1oOjZj-0004JI-0V for mharc-grub-devel@gnu.org; Thu, 18 Aug 2022 13:44:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35998) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOjZh-0004Hr-5s for grub-devel@gnu.org; Thu, 18 Aug 2022 13:44:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:37705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oOjZf-0000tO-Dg for grub-devel@gnu.org; Thu, 18 Aug 2022 13:44:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660844693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P7TCncocAYfth6Sk7t4S4j4R2HeOCw/s0E+Ocm1QywE=; b=fX/3LG4VaZ8cK7JDQKBT/V3oN7ylfUjNdrIlhQf3fh5NTGX+sORyQa5toAst1NeKcXsR/G P77OW85b6gIbqR1leY+fRhsaJQU1+54rhU8TUVE3rDBXNn3LgltS3q2onSJCfFtg9KgzXM gxaWHHhdAeH2RKA3wszlKnfAypqLVbE= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-499-eIsgOE1lMWClna4QfR432Q-1; Thu, 18 Aug 2022 13:44:49 -0400 X-MC-Unique: eIsgOE1lMWClna4QfR432Q-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 563C53C025C6; Thu, 18 Aug 2022 17:44:49 +0000 (UTC) Received: from eesha.redhat.com (unknown [10.22.10.250]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16676492C3B; Thu, 18 Aug 2022 17:44:49 +0000 (UTC) From: Robbie Harwood To: grub-devel@gnu.org Cc: dkiper@net-space.pl, pmenzel@molgen.mpg.de, javierm@redhat.com, development@efficientek.com, Robbie Harwood Subject: [PATCH v3 2/5] Make all grub_efi_guid_t variables static Date: Thu, 18 Aug 2022 13:44:34 -0400 Message-Id: <20220818174437.82289-2-rharwood@redhat.com> In-Reply-To: <20220818174437.82289-1-rharwood@redhat.com> References: <20220818174027.25516-1-rharwood@redhat.com> <20220818174437.82289-1-rharwood@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true Received-SPF: pass client-ip=170.10.129.124; envelope-from=rharwood@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2022 17:44:57 -0000 This is believed to result in smaller code. Signed-off-by: Robbie Harwood --- grub-core/commands/efi/efifwsetup.c | 4 ++-- grub-core/efiemu/i386/pc/cfgtables.c | 6 +++--- grub-core/kern/efi/fdt.c | 2 +- grub-core/loader/efi/fdt.c | 2 +- grub-core/term/efi/console.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/grub-core/commands/efi/efifwsetup.c b/grub-core/commands/efi/efifwsetup.c index b5b1f106c6..51bb2ace3b 100644 --- a/grub-core/commands/efi/efifwsetup.c +++ b/grub-core/commands/efi/efifwsetup.c @@ -36,7 +36,7 @@ grub_cmd_fwsetup (grub_command_t cmd __attribute__ ((unused)), grub_efi_uint64_t os_indications = GRUB_EFI_OS_INDICATIONS_BOOT_TO_FW_UI; grub_err_t status; grub_size_t oi_size; - grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID; + static grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID; grub_efi_get_variable ("OsIndications", &global, &oi_size, (void **) &old_os_indications); @@ -63,7 +63,7 @@ efifwsetup_is_supported (void) { grub_efi_uint64_t *os_indications_supported = NULL; grub_size_t oi_size = 0; - grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID; + static grub_efi_guid_t global = GRUB_EFI_GLOBAL_VARIABLE_GUID; grub_boolean_t ret = 0; grub_efi_get_variable ("OsIndicationsSupported", &global, &oi_size, diff --git a/grub-core/efiemu/i386/pc/cfgtables.c b/grub-core/efiemu/i386/pc/cfgtables.c index e5fffb7d4a..1098f0b79f 100644 --- a/grub-core/efiemu/i386/pc/cfgtables.c +++ b/grub-core/efiemu/i386/pc/cfgtables.c @@ -29,9 +29,9 @@ grub_machine_efiemu_init_tables (void) { void *table; grub_err_t err; - grub_efi_guid_t smbios = GRUB_EFI_SMBIOS_TABLE_GUID; - grub_efi_guid_t acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID; - grub_efi_guid_t acpi = GRUB_EFI_ACPI_TABLE_GUID; + static grub_efi_guid_t smbios = GRUB_EFI_SMBIOS_TABLE_GUID; + static grub_efi_guid_t acpi20 = GRUB_EFI_ACPI_20_TABLE_GUID; + static grub_efi_guid_t acpi = GRUB_EFI_ACPI_TABLE_GUID; err = grub_efiemu_unregister_configuration_table (smbios); if (err) diff --git a/grub-core/kern/efi/fdt.c b/grub-core/kern/efi/fdt.c index 30100c61c1..24f955289f 100644 --- a/grub-core/kern/efi/fdt.c +++ b/grub-core/kern/efi/fdt.c @@ -24,7 +24,7 @@ void * grub_efi_get_firmware_fdt (void) { grub_efi_configuration_table_t *tables; - grub_efi_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID; + static grub_efi_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID; void *firmware_fdt = NULL; unsigned int i; diff --git a/grub-core/loader/efi/fdt.c b/grub-core/loader/efi/fdt.c index c86f283d75..80d7088747 100644 --- a/grub-core/loader/efi/fdt.c +++ b/grub-core/loader/efi/fdt.c @@ -86,7 +86,7 @@ grub_err_t grub_fdt_install (void) { grub_efi_boot_services_t *b; - grub_efi_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID; + static grub_efi_guid_t fdt_guid = GRUB_EFI_DEVICE_TREE_GUID; grub_efi_status_t status; b = grub_efi_system_table->boot_services; diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c index a3622e4fe5..532948a8e1 100644 --- a/grub-core/term/efi/console.c +++ b/grub-core/term/efi/console.c @@ -353,7 +353,7 @@ grub_console_getkeystatus (struct grub_term_input *term) static grub_err_t grub_efi_console_input_init (struct grub_term_input *term) { - grub_efi_guid_t text_input_ex_guid = + static grub_efi_guid_t text_input_ex_guid = GRUB_EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID; if (grub_efi_is_finished) -- 2.35.1