]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
checkpatch: remove quote from CamelCase test
authorJoe Perches <joe@perches.com>
Wed, 19 Jun 2013 00:07:18 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:27:05 +0000 (17:27 +1000)
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>
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",