Commit 8bbea968 authored by Joe Perches's avatar Joe Perches Committed by Linus Torvalds

checkpatch: add more exceptions to 80 char lines

Add new logging functions netdev_<level> and netif_<level>.
Don't complain if the only thing on a line is a quoted string.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@shadowen.org>
Cc: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5150bda4
...@@ -195,7 +195,7 @@ our $typeTypedefs = qr{(?x: ...@@ -195,7 +195,7 @@ our $typeTypedefs = qr{(?x:
our $logFunctions = qr{(?x: our $logFunctions = qr{(?x:
printk| printk|
pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)| pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)|
dev_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)| (dev|netdev|netif)_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)|
WARN| WARN|
panic panic
)}; )};
...@@ -1409,7 +1409,8 @@ sub process { ...@@ -1409,7 +1409,8 @@ sub process {
#80 column limit #80 column limit
if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
$rawline !~ /^.\s*\*\s*\@$Ident\s/ && $rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
$line !~ /^\+\s*$logFunctions\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ && !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ ||
$line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) &&
$length > 80) $length > 80)
{ {
WARN("line over 80 characters\n" . $herecurr); WARN("line over 80 characters\n" . $herecurr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment