Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753905AbcC3UAi (ORCPT ); Wed, 30 Mar 2016 16:00:38 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:32913 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753308AbcC3UAh (ORCPT ); Wed, 30 Mar 2016 16:00:37 -0400 MIME-Version: 1.0 In-Reply-To: <1459289697-12875-1-git-send-email-dvlasenk@redhat.com> References: <1459289697-12875-1-git-send-email-dvlasenk@redhat.com> Date: Wed, 30 Mar 2016 16:00:13 -0400 X-Google-Sender-Auth: pSaA9BcCb2Sf1EgzD8hG_f2bKco Message-ID: Subject: Re: [PATCH] uapi/linux/stddef.h: Provide __always_inline to userspace headers From: Josh Boyer To: Denys Vlasenko Cc: Linus Torvalds , Thomas Graf , Peter Zijlstra , David Rientjes , Arnd Bergmann , Ingo Molnar , Andrew Morton , "Linux-Kernel@Vger. Kernel. Org" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1710 Lines: 58 On Tue, Mar 29, 2016 at 6:14 PM, Denys Vlasenko 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 > void main() {} > > Signed-off-by: Denys Vlasenko > CC: Josh Boyer > CC: Thomas Graf > CC: Peter Zijlstra > CC: David Rientjes > CC: Arnd Bergmann > CC: Ingo Molnar > CC: Andrew Morton > CC: Linus Torvalds > CC: linux-kernel@vger.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 > + > +#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 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