Messages in this thread Patch in this message | | | Subject | [PATCH] scripts/checkpatch.pl: Add more exceptions to 80 char lines | From | Joe Perches <> | Date | Thu, 22 Jul 2010 14:51:46 -0700 |
| |
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: Joe Perches <joe@perches.com> --- scripts/checkpatch.pl | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index bd88f11..b7445f6 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -195,7 +195,7 @@ our $typeTypedefs = qr{(?x: our $logFunctions = qr{(?x: printk| 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| panic )}; @@ -1403,7 +1403,8 @@ sub process { #80 column limit if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && $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) { WARN("line over 80 characters\n" . $herecurr);
| |