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.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -281,7 +281,7 @@ our $typeTypedefs = qr{(?x: · 280 unmodified lines | ||
| 281 | 281 | |
| 282 | 282 | our $logFunctions = qr{(?x: |
| 283 | 283 | printk(?:_ratelimited|_once|)| |
| 284 | − [a-z0-9]+_(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| | |
| 284 | + (?:[a-z0-9]+_){1,2}(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)| | |
| 285 | 285 | WARN(?:_RATELIMIT|_ONCE|)| |
| 286 | 286 | panic| |
| 287 | 287 | MODULE_[A-Z_]+ |