checkpatch.pl: update $logFunctions
authorJoe Perches <joe@perches.com>
Tue, 26 Jul 2011 00:13:27 +0000 (17:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Jul 2011 03:57:16 +0000 (20:57 -0700)
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 <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 8dd720ac0069be8d10ee9d8cca1ce28b9f8d19c9..9d761c95eca2988e0ff227baa8619b684d6eb33a 100755 (executable)
@@ -257,9 +257,9 @@ our $typeTypedefs = qr{(?x:
 )};
 
 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_]+
 )};