Commit 22735ce8 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

checkpatch: ignore SI unit CamelCase variants like "_uV"

Many existing variable names use SI like variants that should be otherwise
obvious and acceptable.

Whitelist them from the CamelCase message.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Suggested-by: default avatarPhil Carmody <phil.carmody@partner.samsung.com>
Acked-by: default avatarPhil Carmody <phil.carmody@partner.samsung.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 786b6326
......@@ -3195,7 +3195,10 @@ sub process {
#CamelCase
if ($var !~ /^$Constant$/ &&
$var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
#Ignore Page<foo> variants
$var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
#Ignore SI style variants like nS, mV and dB (ie: max_uV, regulator_min_uA_show)
$var !~ /^(?:[a-z_]*?)_?[a-z][A-Z](?:_[a-z_]+)?$/ &&
!defined $camelcase{$var}) {
$camelcase{$var} = 1;
CHK("CAMELCASE",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment