summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorJoe Perches2013-07-04 00:05:22 +0200
committerLinus Torvalds2013-07-04 01:07:44 +0200
commit807bd26c4c3e94aced4630ba8369c8941728636b (patch)
tree6583d6b4fa1714d3b10def6256ea5b18dc59ded1 /scripts/checkpatch.pl
parentcheckpatch: add --strict preference for p = kmalloc(sizeof(*p)... (diff)
downloadkernel-qcow2-linux-807bd26c4c3e94aced4630ba8369c8941728636b.tar.gz
kernel-qcow2-linux-807bd26c4c3e94aced4630ba8369c8941728636b.tar.xz
kernel-qcow2-linux-807bd26c4c3e94aced4630ba8369c8941728636b.zip
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 <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 6185eb67df94..2f61b5cc17e1 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",