]> nv-tegra.nvidia Code Review - linux-2.6.git/commitdiff
checkpatch: extend attribute testing to all modifiers
authorAndy Whitcroft <apw@canonical.com>
Fri, 27 Feb 2009 22:03:08 +0000 (14:03 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 28 Feb 2009 00:26:22 +0000 (16:26 -0800)
We should allow testing of all modifiers not just attributes.  Extend
testing and test for all the know modifiers.

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>
scripts/checkpatch.pl

index b9e9ee1315b7bce82ccac88bc934249e0f198063..0dcfdce632b15a2cd3f3eaaf1ff32c755a4561e1 100755 (executable)
@@ -1584,9 +1584,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;