From: Joe Perches Date: Wed, 3 Jul 2013 22:05:22 +0000 (-0700) Subject: checkpatch: remove quote from CamelCase test X-Git-Tag: v3.11-rc1~99^2~234 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=807bd26c4c3e94aced4630ba8369c8941728636b;p=platform%2Fupstream%2Fkernel-adaptation-pc.git checkpatch: remove quote from CamelCase test 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 6185eb6..2f61b5c 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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",