checkpatch: improve CamelCase test for Page
authorJoe Perches <joe@perches.com>
Thu, 28 Feb 2013 01:02:38 +0000 (17:02 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 28 Feb 2013 03:10:08 +0000 (19:10 -0800)
Add the ClearPage/SetPage/TestClearPage/TestSetPage variants to the not
reported Page CamelCase variables.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 747bcd7..b28cc38 100755 (executable)
@@ -2930,7 +2930,7 @@ sub process {
                        my $var = $1;
                        if ($var !~ /$Constant/ &&
                            $var =~ /[A-Z]\w*[a-z]|[a-z]\w*[A-Z]/ &&
-                           $var !~ /^Page[A-Z]/ &&
+                           $var !~ /"^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
                            !defined $camelcase{$var}) {
                                $camelcase{$var} = 1;
                                WARN("CAMELCASE",