diff options
author | Andy Whitcroft <apw@canonical.com> | 2009-09-21 17:04:34 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-09-22 07:17:47 -0700 |
commit | 463f28648586721c2191130c9b3c27589dcc11a0 (patch) | |
tree | 6b9ae0d46a17cd4cd904168e5e818ef68b6c7a04 /scripts | |
parent | fc0d8d944df0c58cd810f33db82f87dcf5dcc190 (diff) | |
download | kernel_samsung_smdk4412-463f28648586721c2191130c9b3c27589dcc11a0.zip kernel_samsung_smdk4412-463f28648586721c2191130c9b3c27589dcc11a0.tar.gz kernel_samsung_smdk4412-463f28648586721c2191130c9b3c27589dcc11a0.tar.bz2 |
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-x | scripts/checkpatch.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 2d5ece7..fd64816 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; |