Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964810AbcDLRt0 (ORCPT ); Tue, 12 Apr 2016 13:49:26 -0400 Received: from smtprelay0163.hostedemail.com ([216.40.44.163]:33524 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932972AbcDLRtZ (ORCPT ); Tue, 12 Apr 2016 13:49:25 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:973:982:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1539:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3352:3653:3865:3870:3872:3874:4321:4362:5007:10004:10400:10848:11026:11232:11658:11783:11914:12043:12517:12519:12740:13069:13311:13357:13439:13894:14181:14659:14721:21080:30054:30064:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: farm56_34c13c75e3514 X-Filterd-Recvd-Size: 1680 Message-ID: <1460483357.2507.24.camel@perches.com> Subject: Re: checkpatch false positon on EXPORT_SYMBOL From: Joe Perches To: Andy Whitcroft Cc: Daniel Walker , open list , Daniel Walker , "xe-kernel@external.cisco.com" Date: Tue, 12 Apr 2016 10:49:17 -0700 In-Reply-To: <20160412125904.GB5107@brain> References: <56FD3BAE.1070209@cisco.com> <1459452096.1744.12.camel@perches.com> <570C1C62.1060008@cisco.com> <1460412582.1800.96.camel@perches.com> <20160412125904.GB5107@brain> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.2-0ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 688 Lines: 22 > On Tue, 2016-04-12 at 13:59 +0100, Andy Whitcroft wrote: > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl [] > @@ -3000,7 +3000,7 @@ sub process { > > ? $realline_next = $line_nr_next; > ? if (defined $realline_next && > ? ????(!defined $lines[$realline_next - 1] || > - ?????substr($lines[$realline_next - 1], $off_next) =~ /^\s*$/)) { > + ?????substr($lines[$realline_next - 1], $off_next) =~ /^($;|\s)*$/)) { > ? $realline_next++; > ?? } This doesn't work with c99 comments like: int foo; // comment EXPORT_SYMBOL(foo); // comment but then again, there aren't any uses like that in the kernel tree so it almost certainly doesn't matter. Thanks Andy.