Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2540806ybl; Thu, 29 Aug 2019 09:30:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqydUrYUTr6fMdAI56LJ9/56173y9s61oDtTGZ2X/5aRfDCI7T7NFCiPmtSzvTw5s0aCaOuD X-Received: by 2002:a17:902:44c:: with SMTP id 70mr10620998ple.225.1567096245418; Thu, 29 Aug 2019 09:30:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567096245; cv=none; d=google.com; s=arc-20160816; b=WWPYwjy3kztof9dWnaPgCzsSrM3OowdDveKrJWWiAWVSPmleyBSS9VG8LcKqkSgZtk soWEsHfRGgicj1f6DpoP6haSIL3FN73INczNCVhIw59G9klMYHj01nHAL/UeBhlHfQ3Q QXhZLixtEj87R1RPCIZtN2tmgizZZ8Url69kyKHqzB69IEWmpq/YIEIKhuMtRRWWmxRB dlTzZ8IvLhldMzHxmfd+nlA5a9k+51AM/9E0uWWGN+LiqRzPCCb7ZOgWgX1S3+d5FZNA 6aoQLlJwLUBuN0kyz9kWkHnSVs4t2/h/mlO2fnA/Vt2UEYzOaYULQ7ZKRQsPCU/Q3wIw QRVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=7BpDGrsj4HEA1SuT/istF2iVfgAsIeHbXaysCvrdAaM=; b=emDr/Ww4aBr+krTEW9szkaYu+mhngkQOirzbV5rT47R5nq7gqVYghQLxnJ9VD/0jwF nqJNtJ/EdSJgCtANou87PP3l4u7V2no+2vCB2hawVIk7wIBd7HFlclJikMYkw4ztnAaJ 8hA/RzLkNdmeLWBfu2UnUTr8dYtW+Tn6h/1SxUQeS5JNpIF1bbIQ+xKSiMim9Qn0Kv+E 1JN6MM1N0nSIWi0MywyyEn5TjV92g+jm9PeycTBPL0SoCuN5G7G4P2qX/f9p+d/30T+w VFYWPjceZO+WrsOfPgnra8dig3QJY34G26jdORaszb4k5p98pMVGc8MNnzZfR33n/e9c Wrrw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u9si2269668plq.412.2019.08.29.09.30.29; Thu, 29 Aug 2019 09:30:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727374AbfH2Q3l (ORCPT + 99 others); Thu, 29 Aug 2019 12:29:41 -0400 Received: from smtprelay0220.hostedemail.com ([216.40.44.220]:46344 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727046AbfH2Q3l (ORCPT ); Thu, 29 Aug 2019 12:29:41 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay02.hostedemail.com (Postfix) with ESMTP id 085D2AC08; Thu, 29 Aug 2019 16:29:40 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 40,2.5,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::,RULES_HIT:41:355:379:599:857:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1543:1593:1594:1711:1730:1747:1777:1792:2198:2199:2393:2559:2562:2693:2731:2828:3138:3139:3140:3141:3142:3355:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:4605:5007:6119:6120:7875:7901:7903:10011:10400:10848:11026:11232:11657:11658:11914:12043:12294:12296:12297:12438:12679:12740:12760:12895:13161:13229:13439:14659:14721:21063:21080:21433:21451:21627:21773:21789:21939:30012:30029:30054:30091,0,RBL:23.242.196.136:@perches.com:.lbl8.mailshell.net-62.8.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:1:0,LFtime:27,LUA_SUMMARY:none X-HE-Tag: bun06_1836a53334c20 X-Filterd-Recvd-Size: 4954 Received: from XPS-9350.home (cpe-23-242-196-136.socal.res.rr.com [23.242.196.136]) (Authenticated sender: joe@perches.com) by omf02.hostedemail.com (Postfix) with ESMTPA; Thu, 29 Aug 2019 16:29:25 +0000 (UTC) Message-ID: <4232843e9fe0444c1c975ac6be4cb81a67f9f6ef.camel@perches.com> Subject: Re: [RFC PATCH 1/5] treewide: replace __inline__ by inline From: Joe Perches To: Rasmus Villemoes , x86@kernel.org, linux-kernel@vger.kernel.org Cc: Ingo Molnar , Thomas Gleixner , "H. Peter Anvin" , Nadav Amit , Linus Torvalds , Miguel Ojeda , ndesaulniers@google.com Date: Thu, 29 Aug 2019 09:29:23 -0700 In-Reply-To: <20190829083233.24162-2-linux@rasmusvillemoes.dk> References: <20190829083233.24162-1-linux@rasmusvillemoes.dk> <20190829083233.24162-2-linux@rasmusvillemoes.dk> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.32.1-2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-08-29 at 10:32 +0200, Rasmus Villemoes wrote: > Currently, compiler_types.h #defines __inline__ as inline. However, > that defeats the purpose of gcc providing __inline__ as an alternate > spelling of that keyword - namely, that it is always accessible under > that name, even if one chooses to #define inline, which we also do in > order to attach attribute(gnu_inline), and sometimes imply > attribute(always_inline), etc. > > Note that it is quite possible that some header file defines a static > inline function before the include chain has reached compiler_types.h, > but in that case both the existing __inline__ as well as the new > inline spelling refer to gcc's keyword, and the redefinitions in > compiler_types.h have no effect anyway. > > For those static inline definitions that appear after compiler_types.h > has been processed, this is obviously a no-op due to the #define > __inline__ inline. > > We will need to be able to use the __inline__ keyword to make use of > the "asm inline()" feature from gcc 9. This is preparation for > removing the #define. > > Generated by > > git grep --files-with-matches -w __inline__ | \ > grep -vE '^(usr|Documentation|scripts)/' | \ > grep -v /uapi/ | \ > xargs sed -i -e 's/static *__inline__/static inline/' bikeshed: Perhaps better to use xargs sed -i -e 's/\b__inline__\b/inline/g' As static and __inline__ do not have to be on the same line. for instance: (and I didn't look thoroughly) This misses one of the uses of __static__ in drivers/scsi/qla2xx/qla_os.c The patch has: > diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c [] > @@ -342,7 +342,7 @@ qla2x00_restart_timer(scsi_qla_host_t *vha, unsigned long interval) > mod_timer(&vha->timer, jiffies + interval * HZ); > } > > -static __inline__ void > +static inline void > qla2x00_stop_timer(scsi_qla_host_t *vha) > { > del_timer_sync(&vha->timer); But the code is: drivers/scsi/qla2xxx/qla_os.c-318-/* TODO Convert to inlines drivers/scsi/qla2xxx/qla_os.c-319- * drivers/scsi/qla2xxx/qla_os.c-320- * Timer routines drivers/scsi/qla2xxx/qla_os.c-321- */ drivers/scsi/qla2xxx/qla_os.c-322- drivers/scsi/qla2xxx/qla_os.c:323:__inline__ void drivers/scsi/qla2xxx/qla_os.c-324-qla2x00_start_timer(scsi_qla_host_t *vha, unsigned long interval) drivers/scsi/qla2xxx/qla_os.c-325-{ drivers/scsi/qla2xxx/qla_os.c-326- timer_setup(&vha->timer, qla2x00_timer, 0); drivers/scsi/qla2xxx/qla_os.c-327- vha->timer.expires = jiffies + interval * HZ; drivers/scsi/qla2xxx/qla_os.c-328- add_timer(&vha->timer); -- drivers/scsi/qla2xxx/qla_os.c-340- } drivers/scsi/qla2xxx/qla_os.c-341- drivers/scsi/qla2xxx/qla_os.c-342- mod_timer(&vha->timer, jiffies + interval * HZ); drivers/scsi/qla2xxx/qla_os.c-343-} drivers/scsi/qla2xxx/qla_os.c-344- drivers/scsi/qla2xxx/qla_os.c:345:static __inline__ void drivers/scsi/qla2xxx/qla_os.c-346-qla2x00_stop_timer(scsi_qla_host_t *vha) drivers/scsi/qla2xxx/qla_os.c-347-{ drivers/scsi/qla2xxx/qla_os.c-348- del_timer_sync(&vha->timer); drivers/scsi/qla2xxx/qla_os.c-349- vha->timer_active = 0; drivers/scsi/qla2xxx/qla_os.c-350-} The possible impacted files using 's/\b__inline__\b/inline/' $ git grep -w '__inline__' -- '*.[ch]' | grep -vP 'static\s+__inline__' (only hand selected matches) arch/alpha/include/asm/compiler.h:#undef __inline__ arch/alpha/include/asm/floppy.h:__inline__ void virtual_dma_init(void) arch/ia64/hp/common/sba_iommu.c:#define SBA_INLINE __inline__ drivers/parisc/sba_iommu.c:#define SBA_INLINE __inline__ drivers/scsi/qla2xxx/qla_os.c:__inline__ void drivers/video/fbdev/intelfb/intelfbdrv.c:__inline__ int intelfb_var_to_depth(const struct fb_var_screeninfo *var)