* [PATCH] efi: Pull up arch-specific prototype efi_systab_show_arch()
@ 2020-05-16 12:59 Benjamin Thiel
2020-05-16 13:01 ` Ard Biesheuvel
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Thiel @ 2020-05-16 12:59 UTC (permalink / raw)
To: linux-efi; +Cc: LKML, Borislav Petkov, 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 <b.thiel@posteo.de>
---
drivers/firmware/efi/efi.c | 7 ++-----
include/linux/efi.h | 4 ++++
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
index 911a2bd0f6b7..d3e7ce6f1027 100644
--- a/drivers/firmware/efi/efi.c
+++ b/drivers/firmware/efi/efi.c
@@ -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
diff --git a/include/linux/efi.h b/include/linux/efi.h
index 251f1f783cdf..e47dae8c8d5f 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -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 */
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] efi: Pull up arch-specific prototype efi_systab_show_arch()
2020-05-16 12:59 [PATCH] efi: Pull up arch-specific prototype efi_systab_show_arch() Benjamin Thiel
@ 2020-05-16 13:01 ` Ard Biesheuvel
0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2020-05-16 13:01 UTC (permalink / raw)
To: Benjamin Thiel; +Cc: linux-efi, LKML, Borislav Petkov
Hi Benjamin,
Thanks for the fix. Comments below.
On Sat, 16 May 2020 at 14:59, Benjamin Thiel <b.thiel@posteo.de> wrote:
>
> ... 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 <b.thiel@posteo.de>
> ---
> drivers/firmware/efi/efi.c | 7 ++-----
> include/linux/efi.h | 4 ++++
> 2 files changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c
> index 911a2bd0f6b7..d3e7ce6f1027 100644
> --- a/drivers/firmware/efi/efi.c
> +++ b/drivers/firmware/efi/efi.c
> @@ -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
> diff --git a/include/linux/efi.h b/include/linux/efi.h
> index 251f1f783cdf..e47dae8c8d5f 100644
> --- a/include/linux/efi.h
> +++ b/include/linux/efi.h
> @@ -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
> +extern char *efi_systab_show_arch(char *str);
and please drop the 'extern' as well - it is redundant for functions.
> +#endif
> +
> #endif /* _LINUX_EFI_H */
> --
> 2.20.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-16 13:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16 12:59 [PATCH] efi: Pull up arch-specific prototype efi_systab_show_arch() Benjamin Thiel
2020-05-16 13:01 ` Ard Biesheuvel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.