From: Nick Desaulniers <ndesaulniers@google.com>
To: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com
Cc: x86@kernel.org, jgross@suse.com, kstewart@linuxfoundation.org,
gregkh@linuxfoundation.org, boris.ostrovsky@oracle.com,
linux-kernel@vger.kernel.org, jdelvare@suse.de,
astrachan@google.com, mka@chromium.org, arnd@arndb.de,
tstellar@redhat.com, sedat.dilek@gmail.com,
David.Laight@aculab.com,
Nick Desaulniers <ndesaulniers@google.com>,
stable@vger.kernel.org
Subject: [PATCH] x86/irqflags: provide a declaration for native_save_fl
Date: Fri, 3 Aug 2018 10:05:50 -0700 [thread overview]
Message-ID: <20180803170550.164688-1-ndesaulniers@google.com> (raw)
In-Reply-To: <CAKwvOdmBtzkca-C1YpB_OYVyqFFi3P_Q8DJPaKr96DFZF0e6Hg@mail.gmail.com>
Fixes commit d0a8d9378d16 ("x86/paravirt: Make native_save_fl() extern
inline").
It was reported that the above commit was causing users of gcc < 4.9 to
observe -Werror=missing-prototypes errors.
Indeed, it seems that:
extern inline unsigned long native_save_fl(void) { return 0; }
compiled with -Werror=missing-prototypes produces this warning in gcc <
4.9, but not gcc >= 4.9.
Cc: stable@vger.kernel.org # 4.17, 4.14, 4.9, 4.4
Reported-by: David Laight <david.laight@aculab.com>
Reported-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
---
arch/x86/include/asm/irqflags.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h
index c4fc17220df9..c14f2a74b2be 100644
--- a/arch/x86/include/asm/irqflags.h
+++ b/arch/x86/include/asm/irqflags.h
@@ -13,6 +13,8 @@
* Interrupt control:
*/
+/* Declaration required for gcc < 4.9 to prevent -Werror=missing-prototypes */
+extern inline unsigned long native_save_fl(void);
extern inline unsigned long native_save_fl(void)
{
unsigned long flags;
--
2.18.0.597.ga71716f1ad-goog
next prev parent reply other threads:[~2018-08-03 17:05 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-03 13:10 native_save_fl() causes a warning Jean Delvare
2018-08-03 16:38 ` Nick Desaulniers
2018-08-03 17:05 ` Nick Desaulniers [this message]
2018-08-05 20:33 ` [tip:x86/urgent] x86/irqflags: Provide a declaration for native_save_fl tip-bot for Nick Desaulniers
2018-08-06 21:33 ` Nick Desaulniers
2018-08-07 7:29 ` Thomas Gleixner
2018-08-07 16:46 ` Nick Desaulniers
2018-08-07 16:57 ` Thomas Gleixner
2018-08-06 10:25 ` [PATCH] x86/irqflags: provide " David Laight
2018-08-06 10:38 ` Sedat Dilek
2018-08-03 17:49 ` native_save_fl() causes a warning Alistair Strachan
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=20180803170550.164688-1-ndesaulniers@google.com \
--to=ndesaulniers@google.com \
--cc=David.Laight@aculab.com \
--cc=arnd@arndb.de \
--cc=astrachan@google.com \
--cc=boris.ostrovsky@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=jdelvare@suse.de \
--cc=jgross@suse.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mka@chromium.org \
--cc=sedat.dilek@gmail.com \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tstellar@redhat.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).