diff options
author | Joe Perches <joe@perches.com> | 2013-07-03 18:05:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:07:45 -0400 |
commit | 22735ce857a2d9f4e6eec37c36be3fcf9d21d154 (patch) | |
tree | ef64119a99ffce6a804a7ff2d9a0e316934b2654 /scripts/checkpatch.pl | |
parent | 786b632622800d73d9b0355c9a79b3f3b5792c6c (diff) |
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: Joe Perches <joe@perches.com>
Suggested-by: Phil Carmody <phil.carmody@partner.samsung.com>
Acked-by: Phil Carmody <phil.carmody@partner.samsung.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-x | scripts/checkpatch.pl | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 5989415985ae..7e8aa1bb0721 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl | |||
@@ -3195,7 +3195,10 @@ sub process { | |||
3195 | #CamelCase | 3195 | #CamelCase |
3196 | if ($var !~ /^$Constant$/ && | 3196 | if ($var !~ /^$Constant$/ && |
3197 | $var =~ /[A-Z][a-z]|[a-z][A-Z]/ && | 3197 | $var =~ /[A-Z][a-z]|[a-z][A-Z]/ && |
3198 | #Ignore Page<foo> variants | ||
3198 | $var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ && | 3199 | $var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ && |
3200 | #Ignore SI style variants like nS, mV and dB (ie: max_uV, regulator_min_uA_show) | ||
3201 | $var !~ /^(?:[a-z_]*?)_?[a-z][A-Z](?:_[a-z_]+)?$/ && | ||
3199 | !defined $camelcase{$var}) { | 3202 | !defined $camelcase{$var}) { |
3200 | $camelcase{$var} = 1; | 3203 | $camelcase{$var} = 1; |
3201 | CHK("CAMELCASE", | 3204 | CHK("CAMELCASE", |