Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934100AbcDLSDB (ORCPT ); Tue, 12 Apr 2016 14:03:01 -0400 Received: from alln-iport-1.cisco.com ([173.37.142.88]:6550 "EHLO alln-iport-1.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933839AbcDLSC7 (ORCPT ); Tue, 12 Apr 2016 14:02:59 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0D1AQA6Nw1X/5BdJa1egzdTfbpmAQ2Bd?= =?us-ascii?q?BmFdAKBNTgUAQEBAQEBAWUnhEIBAQQ4NgoBEAsYCRYPCQMCAQIBRQYBDAgBAYg?= =?us-ascii?q?kwWMBAQEBAQEBAQEBAQEBAQEBAQEBARYLhhaES4oVAQSORIlEhXeIFoI1hwWFV?= =?us-ascii?q?kWOYh4BAUKEBxwwigUBAQE?= X-IronPort-AV: E=Sophos;i="5.24,475,1454976000"; d="scan'208";a="260676012" Subject: Re: checkpatch false positon on EXPORT_SYMBOL To: Joe Perches , Andy Whitcroft References: <56FD3BAE.1070209@cisco.com> <1459452096.1744.12.camel@perches.com> <570C1C62.1060008@cisco.com> <1460412582.1800.96.camel@perches.com> <20160412125904.GB5107@brain> <1460483357.2507.24.camel@perches.com> Cc: open list , Daniel Walker , "xe-kernel@external.cisco.com" From: Daniel Walker Message-ID: <570D3850.4030405@cisco.com> Date: Tue, 12 Apr 2016 11:02:56 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1460483357.2507.24.camel@perches.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Auto-Response-Suppress: DR, OOF, AutoReply Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 914 Lines: 28 On 04/12/2016 10:49 AM, Joe Perches wrote: >> 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. checkpatch.pl is used prior to sending code to a mailing list. So if someone adds code with C99 comments then they would get false warnings. Daniel