summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-05-24 17:13:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-25 08:39:56 -0700
commit0fccc6221821e07366aa44bca112c4edb6d04dd7 (patch)
treeb99a4d1b7df909b4eb3a876cc6ec75d3641ea943 /scripts
parentb05317221b7607ba61ee921c31867ed08912aa46 (diff)
checkpatch: fix defect in printk(KERN_<LEVEL> 80 column exceptions
Currently, printk lines with a only KERN_PREFIX and a quoted string without a comma or close paren that exceed 80 columns are flagged with a warning. ie: printk(KERN_WARNING "some long string that extends beond 80 cols..." "and is continued on another line\n"); Allow this form instead of emitting a warning. 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>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 0e158667d47..8657f99bfb2 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1462,7 +1462,7 @@ 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)
{