All of lore.kernel.org
 help / color / mirror / Atom feed
From: maqiang <maqianga@uniontech.com>
To: boris.ostrovsky@oracle.com, jgross@suse.com,
	sstabellini@kernel.org, tglx@linutronix.de, mingo@redhat.com,
	bp@alien8.de, x86@kernel.org, hpa@zytor.com
Cc: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org,
	maqiang <maqianga@uniontech.com>
Subject: [PATCH] efi: x86/xen: fix -Wmissing-prototypes warning
Date: Wed,  3 Mar 2021 17:36:51 +0800	[thread overview]
Message-ID: <20210303093651.6801-1-maqianga@uniontech.com> (raw)

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)
 {
 	efi_system_table_t *efi_systab_xen;
 
-- 
2.20.1





             reply	other threads:[~2021-03-03  9:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03  9:36 maqiang [this message]
2021-03-03  9:44 ` [PATCH] efi: x86/xen: fix -Wmissing-prototypes warning Jürgen Groß

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210303093651.6801-1-maqianga@uniontech.com \
    --to=maqianga@uniontech.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jgross@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sstabellini@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.