[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CA+5PVA6HS-ihxkh1Kcg4Gs-Bx-Utswgzfp=fAaU-U+e4Jc4nGA@mail.gmail.com>
Date: Wed, 30 Mar 2016 16:00:13 -0400
From: Josh Boyer <jwboyer@...oraproject.org>
To: Denys Vlasenko <dvlasenk@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>,
Thomas Graf <tgraf@...g.ch>,
Peter Zijlstra <peterz@...radead.org>,
David Rientjes <rientjes@...gle.com>,
Arnd Bergmann <arnd@...db.de>, Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Linux-Kernel@...r. Kernel. Org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] uapi/linux/stddef.h: Provide __always_inline to userspace headers
On Tue, Mar 29, 2016 at 6:14 PM, Denys Vlasenko <dvlasenk@...hat.com> wrote:
> Recent change to uapi/linux/swab.h needs this.
>
> Unfortunately, UAPI headers don't include compiler.h and fixing it there is not enough.
>
> Tested. Testcase: "make headers_install" and try to compile this:
>
> #include <linux/swab.h>
> void main() {}
>
> Signed-off-by: Denys Vlasenko <dvlasenk@...hat.com>
> CC: Josh Boyer <jwboyer@...oraproject.org>
> CC: Thomas Graf <tgraf@...g.ch>
> CC: Peter Zijlstra <peterz@...radead.org>
> CC: David Rientjes <rientjes@...gle.com>
> CC: Arnd Bergmann <arnd@...db.de>
> CC: Ingo Molnar <mingo@...nel.org>
> CC: Andrew Morton <akpm@...ux-foundation.org>
> CC: Linus Torvalds <torvalds@...ux-foundation.org>
> CC: linux-kernel@...r.kernel.org
> ---
> include/uapi/linux/stddef.h | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/include/uapi/linux/stddef.h b/include/uapi/linux/stddef.h
> index aa9f104..621fa8a 100644
> --- a/include/uapi/linux/stddef.h
> +++ b/include/uapi/linux/stddef.h
> @@ -1 +1,5 @@
> #include <linux/compiler.h>
> +
> +#ifndef __always_inline
> +#define __always_inline inline
> +#endif
This does appear to fix the compile failure, so from that point of
view you can add:
Tested-by: Josh Boyer <jwboyer@...oraproject.org>
if you'd like.
One thing I did notice that is somewhat unrelated is that the
installed linux/stddef.h is devoid of any header guards. So it is a
file that literally just has the hunk you've patched in and doesn't
have the somewhat standard:
#ifndef _UAPI_LINUX_STDDEF_H
#define _UAPI_LINUX_STDDEF_H
...
#endif
I'm not sure how important that is, but it might be nice to add for
consistency's sake.
josh
Powered by blists - more mailing lists