checkpatch: remove quote from CamelCase test
authorJoe Perches <joe@perches.com>
Wed, 3 Jul 2013 22:05:22 +0000 (15:05 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Jul 2013 23:07:44 +0000 (16:07 -0700)
Commit be987d9f80 ("checkpatch: improve CamelCase test for Page") added
it but it shouldn't be there.  Must have been my fault.

Make sure that the tested variable doesn't contain a constant.

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 6185eb67df94ba24300893634207f53a830a462c..2f61b5cc17e19dc948a2db2826a47fa9581c72ef 100755 (executable)
@@ -2949,9 +2949,9 @@ sub process {
                        }
 
 #CamelCase
-                       if ($var !~ /$Constant/ &&
+                       if ($var !~ /^$Constant$/ &&
                            $var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
-                           $var !~ /"^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
+                           $var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
                            !defined $camelcase{$var}) {
                                $camelcase{$var} = 1;
                                CHK("CAMELCASE",