Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757654AbcC2Sfo (ORCPT ); Tue, 29 Mar 2016 14:35:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43945 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753424AbcC2Sfm (ORCPT ); Tue, 29 Mar 2016 14:35:42 -0400 Message-ID: <56FACAFA.4050209@redhat.com> Date: Tue, 29 Mar 2016 20:35:38 +0200 From: Denys Vlasenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Josh Boyer CC: Linus Torvalds , Thomas Graf , Peter Zijlstra , David Rientjes , Arnd Bergmann , Ingo Molnar , Andrew Morton , "Linux-Kernel@Vger. Kernel. Org" Subject: Re: [PATCH] compiler.h: Provide __always_inline to userspace headers too References: <1459275259-28040-1-git-send-email-dvlasenk@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2096 Lines: 64 On 03/29/2016 08:23 PM, Josh Boyer wrote: > On Tue, Mar 29, 2016 at 2:14 PM, Denys Vlasenko wrote: >> Recent change to uapi/linux/swab.h needs this. >> >> 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/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. You're right, #include gets erased in the installed headers: headers_install.sh ... sed -r \ -e 's/([ \t(])(__user|__force|__iomem)[ \t]/\1/g' \ -e 's/__attribute_const__([ \t]|$)/\1/g' \ -e 's@^#include @@' \ ... Need another location for this fix. How about uapi/linux/stddef.h ? Currently it has just one line: #include (which gets dutifully yanked off by the install script, leaving empty file...) Can we place #ifndef __always_inline #define __always_inline inline #endif here?