aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-08-06 19:11:27 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-08-06 21:01:29 -0400
commit308cc8d8f0deab2c5a5162316277ced556acc71f (patch)
treebfc2cc7c0b7a3aa2136b812d28a5d1a9a86853c0 /scripts
parente81f239b4db2ad6c4b029ed92f0222601ce42abe (diff)
checkpatch: fix false positives for --strict "space after cast" test
Commit 89da401f6cff ("checkpatch: improve "no space after cast" test") in -next improved the cast test for non pointer types, but also introduced false positives for some types of static inlines. Add a test for an open brace to the exclusions to avoid these false positives. Signed-off-by: Joe Perches <joe@perches.com> Reported-by: Hartley Sweeten <HartleyS@visionengravers.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a0880ede3db9..9f14bf928cc7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2456,7 +2456,7 @@ sub process {
2456 } 2456 }
2457 } 2457 }
2458 2458
2459 if ($line =~ /^\+.*\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic)/) { 2459 if ($line =~ /^\+.*\(\s*$Type\s*\)[ \t]+(?!$Assignment|$Arithmetic|{)/) {
2460 if (CHK("SPACING", 2460 if (CHK("SPACING",
2461 "No space is necessary after a cast\n" . $herecurr) && 2461 "No space is necessary after a cast\n" . $herecurr) &&
2462 $fix) { 2462 $fix) {