diff options
author | Joe Perches <joe@perches.com> | 2011-05-25 02:13:41 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 17:39:56 +0200 |
commit | 0fccc6221821e07366aa44bca112c4edb6d04dd7 (patch) | |
tree | b99a4d1b7df909b4eb3a876cc6ec75d3641ea943 /scripts | |
parent | checkpatch: add <foo>_<level> and MODULE_<BAR> to 80 column exceptions (diff) | |
download | linux-0fccc6221821e07366aa44bca112c4edb6d04dd7.tar.xz linux-0fccc6221821e07366aa44bca112c4edb6d04dd7.zip |
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 '')
-rwxr-xr-x | scripts/checkpatch.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 0e158667d478..8657f99bfb2b 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) { |