From: Joe Perches Date: Wed, 25 May 2011 00:13:41 +0000 (-0700) Subject: checkpatch: fix defect in printk(KERN_ 80 column exceptions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0fccc6221821e07366aa44bca112c4edb6d04dd7;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git checkpatch: fix defect in printk(KERN_ 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 Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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) {