summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2009-09-21 17:04:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 07:17:47 -0700
commit463f28648586721c2191130c9b3c27589dcc11a0 (patch)
tree6b9ae0d46a17cd4cd904168e5e818ef68b6c7a04 /scripts
parentfc0d8d944df0c58cd810f33db82f87dcf5dcc190 (diff)
downloadblackbird-op-linux-463f28648586721c2191130c9b3c27589dcc11a0.tar.gz
blackbird-op-linux-463f28648586721c2191130c9b3c27589dcc11a0.zip
checkpatch: possible types -- else cannot start a type
An else cannot start a type, it would have to be within a block after the else. This can trigger false modifier matching. Signed-off-by: Andy Whitcroft <apw@canonical.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, 2 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 2d5ece798c4c..fd6481649258 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1372,6 +1372,8 @@ sub process {
# Ignore functions being called
} elsif ($s =~ /^.\s*$Ident\s*\(/s) {
+ } elsif ($s =~ /^.\s*else\b/s) {
+
# declarations always start with types
} elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?((?:\s*$Ident)+?)\b(?:\s+$Sparse)?\s*\**\s*(?:$Ident|\(\*[^\)]*\))(?:\s*$Modifier)?\s*(?:;|=|,|\()/s) {
my $type = $1;
OpenPOWER on IntegriCloud