From: Andy Whitcroft Date: Fri, 27 Feb 2009 22:03:08 +0000 (-0800) Subject: checkpatch: extend attribute testing to all modifiers X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9360b0e50e9f3e0fd70a077b4ede9885ebc21720;p=linux-2.6-omap-h63xx.git checkpatch: extend attribute testing to all modifiers We should allow testing of all modifiers not just attributes. Extend testing and test for all the know modifiers. Signed-off-by: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index b9e9ee1315b..0dcfdce632b 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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;