From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752628AbeFEV7h (ORCPT ); Tue, 5 Jun 2018 17:59:37 -0400 Received: from smtprelay0083.hostedemail.com ([216.40.44.83]:46626 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752405AbeFEV7e (ORCPT ); Tue, 5 Jun 2018 17:59:34 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: X-HE-Tag: net32_8ccf64e335144 X-Filterd-Recvd-Size: 5529 Message-ID: <91704f8e949fd48869e1b36b959780cf19e96d44.camel@perches.com> Subject: Re: [PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations From: Joe Perches To: Nick Desaulniers Cc: Andrew Morton , Ard Biesheuvel , Andrey Ryabinin , akataria@vmware.com, boris.ostrovsky@oracle.com, brijesh.singh@amd.com, Cao jin , Greg KH , hpa@zytor.com, "J. Kiszka" , jarkko.sakkinen@linux.intel.com, jgross@suse.com, Josh Poimboeuf , kirill.shutemov@linux.intel.com, mingo@redhat.com, mjg59@google.com, Matthias Kaehlcke , Philippe Ombredanne , rostedt@goodmis.org, Thomas Gleixner , thomas.lendacky@amd.com, Thiebaud Weksteen , linux-efi@vger.kernel.org, LKML , x86@kernel.org, virtualization@lists.linux-foundation.org, Alistair Strachan , Manoj Gupta , Greg Hackmann , sedat.dilek@gmail.com, tstellar@redhat.com, Kees Cook , Masahiro Yamada , Michal Marek , Linux Kbuild mailing list , geert@linux-m68k.org, Will Deacon , mawilcox@microsoft.com, Arnd Bergmann , David Rientjes Date: Tue, 05 Jun 2018 14:59:25 -0700 In-Reply-To: References: <20180605170532.170361-1-ndesaulniers@google.com> <20180605170532.170361-2-ndesaulniers@google.com> <202492204c2d5bd5ca27307cbca5e44673b739ed.camel@perches.com> <5ad1876557235a089a50e6ed6c558a7dcb0da714.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.28.1-2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-06-05 at 12:50 -0700, Nick Desaulniers wrote: > On Tue, Jun 5, 2018 at 12:14 PM Joe Perches wrote: > > > > On Tue, 2018-06-05 at 10:23 -0700, Joe Perches wrote: > > > Perhaps these are simpler as > > > > > > #define __inline__ inline > > > #define __inline inline > > > > Currently, there are these uses of inline variants in the kernel > > > > $ git grep -w inline | wc -l > > 68410 > > $ git grep -w __inline__ | wc -l > > 503 > > $ git grep -w __inline | wc -l > > 57 > > > > So it seems it's also reasonable to sed all uses of __inline to inline > > and perhaps remove __inline eventually altogether. > > (perhaps there are still too many __inline__ uses) > > Yeah, that sounds good. Should I split that into 3 patches: > > > Excluding scripts and a few other files, > > here's a possible patch done with: > > > > $ git grep -w --name-only __inline | \ > > grep -vP '^(?:arch/alpha/|include/|scripts/)' | \ > > xargs sed -r -i -e 's/\b__inline\b/inline/g' \ > > -e 's/\binline\s+static\b/static inline/g' > > --- > > Documentation/trace/tracepoint-analysis.rst | 2 +- > > drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++-- > > drivers/staging/rtl8723bs/core/rtw_wlan_util.c | 2 +- > > drivers/staging/rtl8723bs/include/drv_types.h | 6 +++--- > > drivers/staging/rtl8723bs/include/ieee80211.h | 6 +++--- > > drivers/staging/rtl8723bs/include/osdep_service.h | 10 +++++----- > > drivers/staging/rtl8723bs/include/osdep_service_linux.h | 14 +++++++------- > > drivers/staging/rtl8723bs/include/rtw_mlme.h | 14 +++++++------- > > drivers/staging/rtl8723bs/include/rtw_recv.h | 16 ++++++++-------- > > drivers/staging/rtl8723bs/include/sta_info.h | 2 +- > > drivers/staging/rtl8723bs/include/wifi.h | 14 +++++++------- > > drivers/staging/rtl8723bs/include/wlan_bssdef.h | 2 +- > > lib/zstd/mem.h | 2 +- > > 13 files changed, 47 insertions(+), 47 deletions(-) > > > 1 for documentation, 1 for rtl8723bs, 1 for zstd? Seems sensible to me. > Follow up set or include in v3? Your choice. Probably a follow up would work best. Also, the remaining __inline uses would be: arch/alpha/include/asm/compiler.h:#undef __inline include/linux/compiler-gcc.h:#define __inline __inline __attribute__((always_inline,unused)) notrace include/linux/compiler-gcc.h:#define __inline __inline __attribute__((unused)) notrace scripts/checkpatch.pl:our $Inline = qr{inline|__always_inline|noinline|__inline|__inline__}; scripts/checkpatch.pl:# Check for __inline__ and __inline, prefer inline scripts/checkpatch.pl: $line =~ /\b(__inline__|__inline)\b/) { scripts/checkpatch.pl: $fixed[$fixlinenr] =~ s/\b(__inline__|__inline)\b/inline/; scripts/genksyms/keywords.c: { "__inline", INLINE_KEYW }, scripts/kernel-doc: $prototype =~ s/^__inline +//; So all of these could be removed/updated appropriately too