X-Git-Url: http://ftp.safe.ca/?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fcheckpatch.pl;h=2d5ece798c4c6e786b3e6ee305e9830e490d75e9;hb=1fab14ed1acf791e990138c4acdaf4520962f2d5;hp=15a59042512921bb6b9fc755b3a48bb3e55af3d6;hpb=a3340b35787975414d5f6fee83e00640688be2cb;p=safe%2Fjmp%2Flinux-2.6 diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 15a5904..2d5ece7 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -10,7 +10,7 @@ use strict; my $P = $0; $P =~ s@.*/@@g; -my $V = '0.27'; +my $V = '0.28'; use Getopt::Long qw(:config no_auto_abbrev); @@ -110,7 +110,8 @@ our $Sparse = qr{ __iomem| __must_check| __init_refok| - __kprobes + __kprobes| + __ref }x; our $Attribute = qr{ const| @@ -1584,9 +1585,9 @@ sub process { } # TEST: allow direct testing of the attribute matcher. if ($dbg_attr) { - if ($line =~ /^.\s*$Attribute\s*$/) { + if ($line =~ /^.\s*$Modifier\s*$/) { ERROR("TEST: is attr\n" . $herecurr); - } elsif ($dbg_attr > 1 && $line =~ /^.+($Attribute)/) { + } elsif ($dbg_attr > 1 && $line =~ /^.+($Modifier)/) { ERROR("TEST: is not attr ($1 is)\n". $herecurr); } next; @@ -1686,8 +1687,8 @@ sub process { # Modifiers should have spaces. $to =~ s/(\b$Modifier$)/$1 /; - #print "from<$from> to<$to>\n"; - if ($from ne $to) { + #print "from<$from> to<$to> ident<$ident>\n"; + if ($from ne $to && $ident !~ /^$Modifier$/) { ERROR("\"foo${from}bar\" should be \"foo${to}bar\"\n" . $herecurr); } }