Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759173Ab3IBXya (ORCPT ); Mon, 2 Sep 2013 19:54:30 -0400 Received: from perches-mx.perches.com ([206.117.179.246]:41592 "EHLO labridge.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1759051Ab3IBXy3 (ORCPT ); Mon, 2 Sep 2013 19:54:29 -0400 Message-ID: <1378166065.1953.134.camel@joe-AO722> Subject: Re: [PATCH] checkpatch: Report missing spaces around trigraphs with --strict From: Joe Perches To: Josh Triplett Cc: Guenter Roeck , Andrew Morton , Andy Whitcroft , ksummit-2013-discuss@lists.linuxfoundation.org, Linus Torvalds , linux-kernel@vger.kernel.org, Mauro Carvalho Chehab Date: Mon, 02 Sep 2013 16:54:25 -0700 In-Reply-To: <20130902231514.GA1163@leaf> References: <9976.1378132260@warthog.procyon.org.uk> <1378138205.1953.66.camel@joe-AO722> <20130902181510.GA29787@leaf> <20130902181856.GB29787@leaf> <20130902153945.6d7e510c@samsung.com> <1378148367.1953.98.camel@joe-AO722> <20130902195056.GB32628@leaf> <5224EF32.5060104@roeck-us.net> <1378160086.1953.129.camel@joe-AO722> <20130902231514.GA1163@leaf> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.6.4-0ubuntu1 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: 1129 Lines: 32 > would you mind looking at why > it gives a false positive for spaces around '*' on my recent patch at > http://mid.gmane.org/20130901234251.GB25057@leaf ? It appears to > mistake the '*' of a pointer for a multiply. Looks like checkpatch thinks this should be a multiplication. Try this: --- scripts/checkpatch.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9bb056c..e421b5e 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -3005,7 +3005,7 @@ sub process { $op eq '*' or $op eq '/' or $op eq '%') { - if ($ctx =~ /Wx[^WCE]|[^WCE]xW/) { + if ($ctx =~ /Wx[^WCEB]|[^WCE]xW/) { if (ERROR("SPACING", "need consistent spacing around '$op' $at\n" . $hereptr)) { $good = rtrim($fix_elements[$n]) . " " . trim($fix_elements[$n + 1]) . " "; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/