mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Hartley Sweeten <HartleyS@visionengravers.com>
Cc: Andy Whitcroft <apw@canonical.com>, LKML <linux-kernel@vger.kernel.org>
Subject: Re: checkpatch.pl false positive
Date: Tue, 22 Jul 2014 12:23:08 -0700	[thread overview]
Message-ID: <1406056988.2755.1.camel@joe-AO725> (raw)
In-Reply-To: <DC148C5AA1CEBA4E87973D432B1C2D8825F13B6F@P3PWEX4MB008.ex4.secureserver.net>


On Tue, 2014-07-22 at 17:30 +0000, Hartley Sweeten wrote:
> Joe,
> 
> I think this is a false positive, at least the check message appears
> incorrect:
> 
> CHECK: No space is necessary after a cast
> #66: FILE: arch/arm/mach-ep93xx/include/mach/platform.h:66:
> +static inline int crunch_init(void) { return 0; }

Yeah, it's a false positive introduced by -next
commit 89da401f6cff ("checkpatch: improve "no space after cast" test")

Try this?
---
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2258497..644c2d5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2418,7 +2418,7 @@ sub process {
 			}
 		}
 
-		if ($line =~ /^\+.*\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic)/) {
+		if ($line =~ /^\+.*\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|{)/) {
 			if (CHK("SPACING",
 				"No space is necessary after a cast\n" . $herecurr) &&
 			    $fix) {



       reply	other threads:[~2014-07-22 19:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <DC148C5AA1CEBA4E87973D432B1C2D8825F13B6F@P3PWEX4MB008.ex4.secureserver.net>
2014-07-22 19:23 ` Joe Perches [this message]
2014-07-22 19:46   ` Hartley Sweeten
2014-07-23  4:31   ` [PATCH] checkpatch: Fix false positives for --strict "space after cast" test Joe Perches
     [not found] <DB6PR0901MB1173A77EA985D67344E42029F5E50@DB6PR0901MB1173.eurprd09.prod.outlook.com>
2017-05-22 18:52 ` checkpatch.pl false positive Joe Perches

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406056988.2755.1.camel@joe-AO725 \
    --to=joe@perches.com \
    --cc=HartleyS@visionengravers.com \
    --cc=apw@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®