aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index c79abb41793d..9883de38b446 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -844,11 +844,11 @@ sub annotate_values {
844 $type = 'V'; 844 $type = 'V';
845 $av_pending = 'V'; 845 $av_pending = 'V';
846 846
847 } elsif ($cur =~ /^($Ident\s*):/) { 847 } elsif ($cur =~ /^($Ident\s*):(?:\s*\d+\s*(,|=|;))?/) {
848 if ($type eq 'E') { 848 if (defined $2 && $type eq 'C' || $type eq 'T') {
849 $av_pend_colon = 'L';
850 } elsif ($type eq 'T') {
851 $av_pend_colon = 'B'; 849 $av_pend_colon = 'B';
850 } elsif ($type eq 'E') {
851 $av_pend_colon = 'L';
852 } 852 }
853 print "IDENT_COLON($1,$type>$av_pend_colon)\n" if ($dbg_values > 1); 853 print "IDENT_COLON($1,$type>$av_pend_colon)\n" if ($dbg_values > 1);
854 $type = 'V'; 854 $type = 'V';
@@ -866,6 +866,10 @@ sub annotate_values {
866 $type = 'E'; 866 $type = 'E';
867 $av_pend_colon = 'O'; 867 $av_pend_colon = 'O';
868 868
869 } elsif ($cur =~/^(,)/) {
870 print "COMMA($1)\n" if ($dbg_values > 1);
871 $type = 'C';
872
869 } elsif ($cur =~ /^(\?)/o) { 873 } elsif ($cur =~ /^(\?)/o) {
870 print "QUESTION($1)\n" if ($dbg_values > 1); 874 print "QUESTION($1)\n" if ($dbg_values > 1);
871 $type = 'N'; 875 $type = 'N';
@@ -881,7 +885,7 @@ sub annotate_values {
881 } 885 }
882 $av_pend_colon = 'O'; 886 $av_pend_colon = 'O';
883 887
884 } elsif ($cur =~ /^(;|\[)/o) { 888 } elsif ($cur =~ /^(\[)/o) {
885 print "CLOSE($1)\n" if ($dbg_values > 1); 889 print "CLOSE($1)\n" if ($dbg_values > 1);
886 $type = 'N'; 890 $type = 'N';
887 891