Commit 7d0b6594 authored by Jacob Keller's avatar Jacob Keller Committed by Linus Torvalds

checkpatch: allow longer logging function names

The current $logFunction regular expression allows names like dev_warn,
e_dbg, netdev_info, etc, but some log functions are now written like
e_dev_warn, so allow 1 or 2 word blocks with an underscore before the
logging level.
Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-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 3445686a
...@@ -281,7 +281,7 @@ our $typeTypedefs = qr{(?x: ...@@ -281,7 +281,7 @@ our $typeTypedefs = qr{(?x:
our $logFunctions = qr{(?x: our $logFunctions = qr{(?x:
printk(?:_ratelimited|_once|)| printk(?:_ratelimited|_once|)|
[a-z0-9]+_(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
WARN(?:_RATELIMIT|_ONCE|)| WARN(?:_RATELIMIT|_ONCE|)|
panic| panic|
MODULE_[A-Z_]+ MODULE_[A-Z_]+
......
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