History

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.

Jacob Keller committed 13 years ago

Commit 7d0b6591 parent 34456861 file · +1 −1Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+1−1
@@ -281,7 +281,7 @@ our $typeTypedefs = qr{(?x: · 280 unmodified lines
281 281
282our $logFunctions = qr{(?x:282our $logFunctions = qr{(?x:
283 printk(?:_ratelimited|_once|)|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 WARN(?:_RATELIMIT|_ONCE|)|285 WARN(?:_RATELIMIT|_ONCE|)|
286 panic|286 panic|
287 MODULE_[A-Z_]+287 MODULE_[A-Z_]+

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t