checkpatch: add <foo>_<level> and MODULE_<BAR> to 80 column exceptions
authorJoe Perches <joe@perches.com>
Wed, 25 May 2011 00:13:40 +0000 (17:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 May 2011 15:39:55 +0000 (08:39 -0700)
Many module or file local logging functions use specific prefixes other
than pr|dev|netdev.  Allow all forms like foo_printk and foo_err to be
longer than 80 columns.

Also allow MODULE_<BAR> declarations to be longer than 80 columns.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index 5c9672951077836a483e2e11db12efbf1dc5b524..0e158667d478837843275646578b9aa419500b3a 100755 (executable)
@@ -210,10 +210,10 @@ our $typeTypedefs = qr{(?x:
 
 our $logFunctions = qr{(?x:
        printk|
-       pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)|
-       (dev|netdev|netif)_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)|
+       [a-z]+_(emerg|alert|crit|err|warning|warn|notice|info|debug|dbg|vdbg|devel|cont|WARN)|
        WARN|
-       panic
+       panic|
+       MODULE_[A-Z_]+
 )};
 
 our @typeList = (