[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <78c7a2ed2044e636504f8f42b4d7d8f94a4d2877.1303580986.git.joe@perches.com>
Date: Sat, 23 Apr 2011 10:51:41 -0700
From: Joe Perches <joe@...ches.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Andy Whitcroft <apw@...onical.com>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] 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@...ches.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists