Skip to content

Commit

Permalink
checkpatch: remove quote from CamelCase test
Browse files Browse the repository at this point in the history
Commit be987d9 ("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 <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Jul 3, 2013
1 parent a640d25 commit 807bd26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 807bd26

Please sign in to comment.