From: Andrew Morton <akpm@linux-foundation.org>
To: Josh Boyer <jwboyer@fedoraproject.org>
Cc: Denys Vlasenko <dvlasenk@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Thomas Graf <tgraf@suug.ch>,
Peter Zijlstra <peterz@infradead.org>,
David Rientjes <rientjes@google.com>,
Arnd Bergmann <arnd@arndb.de>, Ingo Molnar <mingo@kernel.org>,
"Linux-Kernel@Vger. Kernel. Org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] compiler.h: Provide __always_inline to userspace headers too
Date: Tue, 29 Mar 2016 11:30:44 -0700 [thread overview]
Message-ID: <20160329113044.9d533ba55e0be2f9b3288bd6@linux-foundation.org> (raw)
In-Reply-To: <CA+5PVA5=edrWFVM7xHQiFF3cv6buvihRHLY8enyJ4B8j6iOifA@mail.gmail.com>
On Tue, 29 Mar 2016 14:23:57 -0400 Josh Boyer <jwboyer@fedoraproject.org> wrote:
> On Tue, Mar 29, 2016 at 2:14 PM, Denys Vlasenko <dvlasenk@redhat.com> wrote:
> > Recent change to uapi/linux/swab.h needs this.
> >
> > Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
> > CC: Josh Boyer <jwboyer@fedoraproject.org>
> > CC: Thomas Graf <tgraf@suug.ch>
> > CC: Peter Zijlstra <peterz@infradead.org>
> > CC: David Rientjes <rientjes@google.com>
> > CC: Arnd Bergmann <arnd@arndb.de>
> > CC: Ingo Molnar <mingo@kernel.org>
> > CC: Andrew Morton <akpm@linux-foundation.org>
> > CC: Linus Torvalds <torvalds@linux-foundation.org>
> > CC: linux-kernel@vger.kernel.org
> > ---
> > include/linux/compiler.h | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/include/linux/compiler.h b/include/linux/compiler.h
> > index b5ff988..2cb6ba4 100644
> > --- a/include/linux/compiler.h
> > +++ b/include/linux/compiler.h
> > @@ -397,12 +397,12 @@ static __always_inline void __write_once_size(volatile void *p, void *res, int s
> > */
> > #define noinline_for_stack noinline
> >
> > +#endif /* __KERNEL__ */
> > +
> > #ifndef __always_inline
> > #define __always_inline inline
> > #endif
> >
> > -#endif /* __KERNEL__ */
> > -
>
> Did you test this by installing the headers with 'make
> headers-install' and trying to build something with the newly
> installed headers? As I said in my other email, I don't see how
> changes to this particular file are reflected in anything that gets
> installed in /usr/include by the uapi mechanism.
include/uapi/linux/swab.h already had __attribute_const__ and that
worked OK so presumably treating __always_inline in the same fashion
will also work. But yes, testing please.
Also, more care with the changelogs please. "Recent change" is
uselessly vague, and Josh kindly reported the regression, so...
From: Denys Vlasenko <dvlasenk@redhat.com>
Subject: compiler.h: provide __always_inline to userspace headers too
Recent change to uapi/linux/swab.h needs this.
In file included from test.c:2:0:
/usr/include/linux/swab.h:154:8: error: unknown type name `__always_inline'
static __always_inline __u16 __swab16p(const __u16 *p)
^~~~~~~~~~~~~~~
Fixes: bc27fb68aaad4 ("include/uapi/linux/byteorder, swab: force inlining of some byteswap operations")
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Reported-by: Josh Boyer <jwboyer@fedoraproject.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/compiler.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN include/linux/compiler.h~compilerh-provide-__always_inline-to-userspace-headers-too include/linux/compiler.h
--- a/include/linux/compiler.h~compilerh-provide-__always_inline-to-userspace-headers-too
+++ a/include/linux/compiler.h
@@ -397,12 +397,12 @@ static __always_inline void __write_once
*/
#define noinline_for_stack noinline
+#endif /* __KERNEL__ */
+
#ifndef __always_inline
#define __always_inline inline
#endif
-#endif /* __KERNEL__ */
-
/*
* From the GCC manual:
*
_
next prev parent reply other threads:[~2016-03-29 18:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 18:14 Denys Vlasenko
2016-03-29 18:23 ` Josh Boyer
2016-03-29 18:30 ` Andrew Morton [this message]
2016-03-29 18:35 ` Denys Vlasenko
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=20160329113044.9d533ba55e0be2f9b3288bd6@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=dvlasenk@redhat.com \
--cc=jwboyer@fedoraproject.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rientjes@google.com \
--cc=tgraf@suug.ch \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®