summaryrefslogtreecommitdiffstats
path: root/scripts/checkpatch.pl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-07-03 15:05:22 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 16:07:44 -0700
commit807bd26c4c3e94aced4630ba8369c8941728636b (patch)
tree6583d6b4fa1714d3b10def6256ea5b18dc59ded1 /scripts/checkpatch.pl
parenta640d25cead66457ac14a878234f8b323ba8aade (diff)
downloadlinux-stable-807bd26c4c3e94aced4630ba8369c8941728636b.tar.gz
linux-stable-807bd26c4c3e94aced4630ba8369c8941728636b.tar.bz2
linux-stable-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",