Skip to content

Commit

Permalink
checkpatch.pl: update $logFunctions
Browse files Browse the repository at this point in the history
Previous behavior allowed only alphabetic prefixes like pr_info to exceed
the 80 column line length limit.

ath6kl wants to add a digit into the prefix, so allow numbers as well as
digits in the <prefix>_<level> printks.

<prefix>_<level>_ratelimited and <prefix>_<level>_once and WARN_RATELIMIT
and WARN_ONCE may now exceed 80 cols.

Add missing <prefix>_printk type for completeness.

Signed-off-by: Joe Perches <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Cc: Kalle Valo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
JoePerches authored and torvalds committed Jul 26, 2011
1 parent 34d9921 commit 6e60c02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ sub help {
)};

our $logFunctions = qr{(?x:
printk|
[a-z]+_(emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)|
WARN|
printk(?:_ratelimited|_once|)|
[a-z0-9]+_(?:printk|emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)(?:_ratelimited|_once|)|
WARN(?:_RATELIMIT|_ONCE|)|
panic|
MODULE_[A-Z_]+
)};
Expand Down

0 comments on commit 6e60c02

Please sign in to comment.