Messages in this thread Patch in this message | | | From | Joe Perches <> | Subject | [PATCH 2/2] checkpatch: Fix defect in printk(KERN_<LEVEL> 80 column exceptions | Date | Sat, 23 Apr 2011 10:51:41 -0700 |
| |
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> --- scripts/checkpatch.pl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index fbe7733..5385f31 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) { -- 1.7.5.rc3.dirty
| |