From 8bbea968f9022c3f66a36902509574597611be99 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Mon, 9 Aug 2010 17:21:01 -0700 Subject: checkpatch: add more exceptions to 80 char lines Add new logging functions netdev_ and netif_. Don't complain if the only thing on a line is a quoted string. Signed-off-by: Joe Perches Cc: Andy Whitcroft Cc: Wolfram Sang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- scripts/checkpatch.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 25d716cc44dc..2018f4349b47 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 )}; @@ -1409,7 +1409,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); -- cgit v1.2.3