summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2008-07-23 21:29:01 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 10:47:25 -0700
commitf4c014c0dede10cc0a8463e748892e738e190699 (patch)
treee4eb11df93e1d716db70c5bd20fa3cb8c6106210
parent548596d523d83dff5a670beb84be0daf4c3bcd16 (diff)
downloadop-kernel-dev-f4c014c0dede10cc0a8463e748892e738e190699.zip
op-kernel-dev-f4c014c0dede10cc0a8463e748892e738e190699.tar.gz
checkpatch: allow printk strings to exceed 80 characters to maintain their searchability
Allow printk strings to break the 80 character width limits, thus keeping them complete and searchable. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 89177c3..614999f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1138,7 +1138,9 @@ sub process {
}
#80 column limit
if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
- $rawline !~ /^.\s*\*\s*\@$Ident\s/ && $length > 80)
+ $rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
+ $line !~ /^\+\s*printk\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ &&
+ $length > 80)
{
WARN("line over 80 characters\n" . $herecurr);
}
OpenPOWER on IntegriCloud