History

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.

Joe Perches committed 15 years ago

Commit 0fccc621 parent b0531721 file · +1 −1Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+1−1
@@ -1462,7 +1462,7 @@ sub process { · 1461 unmodified lines
14621462 #80 column limit
14631463 if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
14641464 $rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
1465− !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ ||
1465+ !($line =~ /^\+\s*$logFunctions\s*\(\s*(?:(KERN_\S+\s*|[^"]*))?"[X\t]*"\s*(?:|,|\)\s*;)\s*$/ ||
14661466 $line =~ /^\+\s*"[^"]*"\s*(?:\s*|,|\)\s*;)\s*$/) &&
14671467 $length > 80)
14681468 {