aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl24
1 files changed, 18 insertions, 6 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 118fe1f30e76..6b21188d2cf7 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -913,12 +913,22 @@ sub annotate_values {
913sub possible { 913sub possible {
914 my ($possible, $line) = @_; 914 my ($possible, $line) = @_;
915 915
916 print "CHECK<$possible> ($line)\n" if ($dbg_possible > 1); 916 print "CHECK<$possible> ($line)\n" if ($dbg_possible > 2);
917 if ($possible !~ /^(?:$Modifier|$Storage|$Type|DEFINE_\S+)$/ && 917 if ($possible !~ /(?:
918 $possible ne 'goto' && $possible ne 'return' && 918 ^(?:
919 $possible ne 'case' && $possible ne 'else' && 919 $Modifier|
920 $possible ne 'asm' && $possible ne '__asm__' && 920 $Storage|
921 $possible !~ /^(typedef|struct|enum)\b/) { 921 $Type|
922 DEFINE_\S+|
923 goto|
924 return|
925 case|
926 else|
927 asm|__asm__|
928 do
929 )$|
930 ^(?:typedef|struct|enum)\b
931 )/x) {
922 # Check for modifiers. 932 # Check for modifiers.
923 $possible =~ s/\s*$Storage\s*//g; 933 $possible =~ s/\s*$Storage\s*//g;
924 $possible =~ s/\s*$Sparse\s*//g; 934 $possible =~ s/\s*$Sparse\s*//g;
@@ -936,6 +946,8 @@ sub possible {
936 push(@typeList, $possible); 946 push(@typeList, $possible);
937 } 947 }
938 build_types(); 948 build_types();
949 } else {
950 warn "NOTPOSS: $possible ($line)\n" if ($dbg_possible > 1);
939 } 951 }
940} 952}
941 953