* Re: [PATCH] efi: x86/xen: fix -Wmissing-prototypes warning
[not found] <20210303093651.6801-1-maqianga@uniontech.com>
@ 2021-03-03 9:44 ` Jürgen Groß
0 siblings, 0 replies; only message in thread
From: Jürgen Groß @ 2021-03-03 9:44 UTC (permalink / raw)
To: maqiang, boris.ostrovsky, sstabellini, tglx, mingo, bp, x86, hpa
Cc: xen-devel, linux-kernel
[-- Attachment #1.1.1: Type: text/plain, Size: 1206 bytes --]
On 03.03.21 10:36, maqiang wrote:
> We get 1 warning when building kernel with W=1:
> arch/x86/xen/efi.c:130:13: warning:
> no previous prototype for ‘xen_efi_init’ [-Wmissing-prototypes]
> void __init xen_efi_init(struct boot_params *boot_params)
>
> In fact, this function is declared as a static inline function
> in header file, but is not decorated as a static inline function
> in source file.
> So this patch marks this function with 'static inline'.
>
> Signed-off-by: maqiang <maqianga@uniontech.com>
> ---
> arch/x86/xen/efi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/xen/efi.c b/arch/x86/xen/efi.c
> index 7d7ffb9c826a..cf2e9ff3866d 100644
> --- a/arch/x86/xen/efi.c
> +++ b/arch/x86/xen/efi.c
> @@ -127,7 +127,7 @@ static enum efi_secureboot_mode xen_efi_get_secureboot(void)
> return efi_secureboot_mode_enabled;
> }
>
> -void __init xen_efi_init(struct boot_params *boot_params)
> +static inline void __init xen_efi_init(struct boot_params *boot_params)
This is an absolutely wrong "fix". You are breaking a normal build
as xen_efi_init() will no longer be callable from other sources.
Juergen
[-- Attachment #1.1.2: OpenPGP_0xB0DE9DD628BF132F.asc --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-03 14:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20210303093651.6801-1-maqianga@uniontech.com>
2021-03-03 9:44 ` [PATCH] efi: x86/xen: fix -Wmissing-prototypes warning Jürgen Groß
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®