aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 9c209165f252..8a3b0fd67ad7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -859,8 +859,10 @@ sub possible {
859 859
860 } elsif ($possible =~ /\s/) { 860 } elsif ($possible =~ /\s/) {
861 $possible =~ s/\s*$Type\s*//g; 861 $possible =~ s/\s*$Type\s*//g;
862 warn "MODIFIER: $possible ($line)\n" if ($dbg_possible); 862 for my $modifier (split(' ', $possible)) {
863 push(@modifierList, $possible); 863 warn "MODIFIER: $modifier ($possible) ($line)\n" if ($dbg_possible);
864 push(@modifierList, $modifier);
865 }
864 866
865 } else { 867 } else {
866 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible); 868 warn "POSSIBLE: $possible ($line)\n" if ($dbg_possible);
@@ -1186,7 +1188,7 @@ sub process {
1186 } elsif ($s =~ /^.\s*$Ident\s*\(/s) { 1188 } elsif ($s =~ /^.\s*$Ident\s*\(/s) {
1187 1189
1188 # declarations always start with types 1190 # declarations always start with types
1189 } elsif ($prev_values eq 'E' && $s =~ /^.\s*(?:$Storage\s+)?(?:$Inline\s+)?(?:const\s+)?((?:\s*$Ident)+)\b(?:\s+$Sparse)?\s*\**\s*(?:$Ident|\(\*[^\)]*\))\s*(?:;|=|,|\()/s) { 1191 } 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) {
1190 my $type = $1; 1192 my $type = $1;
1191 $type =~ s/\s+/ /g; 1193 $type =~ s/\s+/ /g;
1192 possible($type, "A:" . $s); 1194 possible($type, "A:" . $s);