Commit 4104a206 authored by Łukasz Stelmach's avatar Łukasz Stelmach Committed by Linus Torvalds

checkpatch: ignore generated CamelCase defines and enum values

Ignore autogenerated CamelCase-like defines and enum values like
DRM_MODE_CONNECTOR_Unknown or ETHTOOL_LINK_MODE_Asym_Pause_BIT.

Link: https://lkml.kernel.org/r/20201022184916.7904-1-l.stelmach@samsung.comSigned-off-by: default avatarŁukasz Stelmach <l.stelmach@samsung.com>
Suggested-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 8d0325cc
......@@ -5320,6 +5320,8 @@ sub process {
#CamelCase
if ($var !~ /^$Constant$/ &&
$var =~ /[A-Z][a-z]|[a-z][A-Z]/ &&
#Ignore some autogenerated defines and enum values
$var !~ /^(?:[A-Z]+_){1,5}[A-Z]{1,3}[a-z]/ &&
#Ignore Page<foo> variants
$var !~ /^(?:Clear|Set|TestClear|TestSet|)Page[A-Z]/ &&
#Ignore SI style variants like nS, mV and dB
......
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