[tip:x86/efi-kexec] x86/efi: Delete superfluous global variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  518548abd61808ea1e31614ccbdae34d3c32dfa4
Gitweb:     http://git.kernel.org/tip/518548abd61808ea1e31614ccbdae34d3c32dfa4
Author:     Matt Fleming <matt.fleming@xxxxxxxxx>
AuthorDate: Sat, 21 Dec 2013 16:09:46 +0000
Committer:  Matt Fleming <matt.fleming@xxxxxxxxx>
CommitDate: Sun, 29 Dec 2013 13:09:08 +0000

x86/efi: Delete superfluous global variables

There's no need to save the runtime map details in global variables, the
values are only required to pass to efi_runtime_map_setup().

And because 'nr_efi_runtime_map' isn't needed, get_nr_runtime_map() can
be deleted along with 'efi_data_len'.

Cc: Dave Young <dyoung@xxxxxxxxxx>
Signed-off-by: Matt Fleming <matt.fleming@xxxxxxxxx>
---
 arch/x86/platform/efi/efi.c    | 18 +-----------------
 arch/x86/platform/efi/efi_64.c |  1 -
 2 files changed, 1 insertion(+), 18 deletions(-)

diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
index 9965ff4..7ed3ecf 100644
--- a/arch/x86/platform/efi/efi.c
+++ b/arch/x86/platform/efi/efi.c
@@ -76,10 +76,7 @@ static __initdata efi_config_table_type_t arch_tables[] = {
 	{NULL_GUID, NULL, NULL},
 };
 
-static void *efi_runtime_map;
-static int nr_efi_runtime_map;
 u64 efi_setup;		/* efi setup_data physical address */
-u32 efi_data_len;	/* efi setup_data payload length */
 
 /*
  * Returns 1 if 'facility' is enabled, 0 otherwise.
@@ -702,15 +699,6 @@ out:
 	return ret;
 }
 
-static void get_nr_runtime_map(void)
-{
-	if (!efi_setup)
-		return;
-
-	nr_efi_runtime_map = (efi_data_len - sizeof(struct efi_setup_data)) /
-			     sizeof(efi_memory_desc_t);
-}
-
 void __init efi_init(void)
 {
 	efi_char16_t *c16;
@@ -718,7 +706,6 @@ void __init efi_init(void)
 	int i = 0;
 	void *tmp;
 
-	get_nr_runtime_map();
 #ifdef CONFIG_X86_32
 	if (boot_params.efi_info.efi_systab_hi ||
 	    boot_params.efi_info.efi_memmap_hi) {
@@ -933,10 +920,7 @@ static int __init save_runtime_map(void)
 		count++;
 	}
 
-	efi_runtime_map = q;
-	nr_efi_runtime_map = count;
-	efi_runtime_map_setup(efi_runtime_map, nr_efi_runtime_map,
-			      boot_params.efi_info.efi_memdesc_size);
+	efi_runtime_map_setup(q, count, memmap.desc_size);
 
 	return 0;
 out:
diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c
index 324b651..6284f15 100644
--- a/arch/x86/platform/efi/efi_64.c
+++ b/arch/x86/platform/efi/efi_64.c
@@ -232,5 +232,4 @@ void __iomem *__init efi_ioremap(unsigned long phys_addr, unsigned long size,
 void __init parse_efi_setup(u64 phys_addr, u32 data_len)
 {
 	efi_setup = phys_addr + sizeof(struct setup_data);
-	efi_data_len = data_len - sizeof(struct setup_data);
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux