Ignore all upper-case variants before and after SI units like mA, mV and uV so uses like RANGE_mA do not emit a CAMELCASE message.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -5038,8 +5038,9 @@ sub process { · 5037 unmodified lines | |||
| 5038 | $var =~ /[A-Z][a-z]|[a-z][A-Z]/ && | 5038 | $var =~ /[A-Z][a-z]|[a-z][A-Z]/ && |
| 5039 | #Ignore Page<foo> variants | 5039 | #Ignore Page<foo> variants |
| 5040 | $var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ && | 5040 | $var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ && |
| 5041 | #Ignore SI style variants like nS, mV and dB (ie: max_uV, regulator_min_uA_show) | 5041 | #Ignore SI style variants like nS, mV and dB |
| 5042 | $var !~ /^(?:[a-z_]*?)_?[a-z][A-Z](?:_[a-z_]+)?$/ && | 5042 | #(ie: max_uV, regulator_min_uA_show, RANGE_mA_VALUE) |
| 5043 | $var !~ /^(?:[a-z0-9_]*|[A-Z0-9_]*)?_?[a-z][A-Z](?:_[a-z0-9_]+|_[A-Z0-9_]+)?$/ && | ||
| 5043 | #Ignore some three character SI units explicitly, like MiB and KHz | 5044 | #Ignore some three character SI units explicitly, like MiB and KHz |
| 5044 | $var !~ /^(?:[a-z_]*?)_?(?:[KMGT]iB|[KMGT]?Hz)(?:_[a-z_]+)?$/) { | 5045 | $var !~ /^(?:[a-z_]*?)_?(?:[KMGT]iB|[KMGT]?Hz)(?:_[a-z_]+)?$/) { |
| 5045 | while ($var =~ m{($Ident)}g) { | 5046 | while ($var =~ m{($Ident)}g) { |