From e1d013167f86ebbf59fc3bcf56fd333f49acbe16 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 28 Jun 2013 09:52:51 +1000 Subject: [PATCH] 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 --- scripts/checkpatch.pl | 4 ++-- 1 file 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", -- 2.39.5