efi: Pull up arch-specific prototype efi_systab_show_arch()
PATCH 1/1 efi: Pull up arch-specific prototype efi_systab_show_arch()
... in order to fix a -Wmissing-prototypes warning:
arch/x86/platform/efi/efi.c:957:7: warning: no previous prototype for ‘efi_systab_show_arch’ [-Wmissing-prototypes]
char *efi_systab_show_arch(char *str)
Signed-off-by Benjamin Thiel <[email protected]>
--- drivers/firmware/efi/efi.c | 7 ++----- include/linux/efi.h | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-)
drivers/firmware/efi/efi.c +2 -5
@@ -130,11 +130,8 @@ static ssize_t systab_show(struct kobject *kobj,if (efi.smbios !=EFI_INVALID_TABLE_ADDR ) str +=sprintf (str,"SMBIOS=0x%lx\n" , efi.smbios); -if (IS_ENABLED (CONFIG_IA64 ) ||IS_ENABLED (CONFIG_X86 )) { -extern char *efi_systab_show_arch (char *str); - +if (IS_ENABLED (CONFIG_IA64 ) ||IS_ENABLED (CONFIG_X86 )) str =efi_systab_show_arch (str); - }return str - buf; }
@@ -1012,4 +1009,4 @@ static int __init register_update_efi_random_seed(void) return register_reboot_notifier(&efi_random_seed_nb); }late_initcall (register_update_efi_random_seed); -#endif +#endifefi_systab_show_arch
include/linux/efi.h +4 -0
@@ -1245,4 +1245,8 @@ struct linux_efi_memreserve {void __init efi_arch_mem_reserve (phys_addr_t addr,u64 size); +#if defined(CONFIG_IA64 ) || defined(CONFIG_X86 ) +extern char *efi_systab_show_arch (char *str); +#endif +#endif /* _LINUX_EFI_H */
Signature · 1 line
2.20.1
Ard Biesheuvel
maintainerHi Benjamin,
Thanks for the fix. Comments below.
Quoted 41 lines · Benjamin Thiel
... in order to fix a -Wmissing-prototypes warning:
arch/x86/platform/efi/efi.c:957:7: warning: no previous prototype for ‘efi_systab_show_arch’ [-Wmissing-prototypes]
char *efi_systab_show_arch(char *str)Signed-off-by Benjamin Thiel <[email protected]>--- drivers/firmware/efi/efi.c | 7 ++----- include/linux/efi.h | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-)drivers/firmware/efi/efi.c +2
-5@@ -130,11 +130,8 @@ static ssize_t systab_show(struct kobject *kobj,if (efi.smbios !=EFI_INVALID_TABLE_ADDR ) str +=sprintf (str,"SMBIOS=0x%lx\n" , efi.smbios); -if (IS_ENABLED (CONFIG_IA64 ) ||IS_ENABLED (CONFIG_X86 )) { -extern char *efi_systab_show_arch (char *str); - +if (IS_ENABLED (CONFIG_IA64 ) ||IS_ENABLED (CONFIG_X86 )) str =efi_systab_show_arch (str); - }return str - buf; }@@ -1012,4 +1009,4 @@ static int __init register_update_efi_random_seed(void) return register_reboot_notifier(&efi_random_seed_nb); }late_initcall (register_update_efi_random_seed); -#endif +#endifefi_systab_show_arch include/linux/efi.h +0
-0
include/linux/efi.h struct linux_efi_memreserve { · line 1248
Quoted 4 lines
include/linux/efi.h +1
-0@@ -1245,4 +1245,8 @@ struct linux_efi_memreserve {void __init efi_arch_mem_reserve (phys_addr_t addr,u64 size); +#if defined(CONFIG_IA64 ) || defined(CONFIG_X86 )
Please drop this conditional
include/linux/efi.h struct linux_efi_memreserve { · line 1249
Quoted 1 line
include/linux/efi.h +1
-0+extern char *efi_systab_show_arch (char *str);
and please drop the 'extern' as well - it is redundant for functions.
Quoted 6 lines
include/linux/efi.h +2
-1+#endif +#endif /* _LINUX_EFI_H */ --2.20.1