Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752083AbdLAUOY (ORCPT ); Fri, 1 Dec 2017 15:14:24 -0500 Received: from smtprelay0171.hostedemail.com ([216.40.44.171]:56425 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751842AbdLAUOV (ORCPT ); Fri, 1 Dec 2017 15:14:21 -0500 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:960:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1540:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3872:3873:3874:4321:5007:6742:8957:10004:10400:10848:11026:11232:11658:11914:12043:12114:12438:12555:12740:12760:12895:13069:13255:13311:13357:13439:14181:14659:21080:21627:30029:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:2,LUA_SUMMARY:none X-HE-Tag: kick27_25a44afb96213 X-Filterd-Recvd-Size: 2088 Message-ID: <1512159257.19952.167.camel@perches.com> Subject: Re: [PATCH tip/core/rcu 20/21] checkpatch: Add warnings for {smp_,}read_barrier_depends() From: Joe Perches To: "Paul E. McKenney" , linux-kernel@vger.kernel.org Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com, akpm@linux-foundation.org, mathieu.desnoyers@efficios.com, josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org, rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com, fweisbec@gmail.com, oleg@redhat.com, Andy Whitcroft Date: Fri, 01 Dec 2017 12:14:17 -0800 In-Reply-To: <1512157876-24665-20-git-send-email-paulmck@linux.vnet.ibm.com> References: <20171201195053.GA23494@linux.vnet.ibm.com> <1512157876-24665-20-git-send-email-paulmck@linux.vnet.ibm.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.26.1-1 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 Content-Length: 885 Lines: 28 On Fri, 2017-12-01 at 11:51 -0800, Paul E. McKenney wrote: > Now that both smp_read_barrier_depends() and read_barrier_depends() > are being de-emphasized, warn if any are added. This would also warn on existing files when run with ./scripts/checkpatch.pl -f Do you want it to check new patches only? If so the test could become "if (!$file && etc...) > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl > index 95cda3ecc66b..25f7098e2ad3 100755 > --- a/scripts/checkpatch.pl > +++ b/scripts/checkpatch.pl > @@ -5586,6 +5586,12 @@ sub process { > } > } > > +# check for smp_read_barrier_depends and read_barrier_depends > + if ($line =~ /\b(smp_|)read_barrier_depends\(/) { Must become + if ($line =~ /\b(smp_|)read_barrier_depends\s*\(/) { similar to the lines above this as there are sometimes spaces between function name and argument parentheses.