aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/checkpatch.pl10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 3e4099a6df51..9a3894dbf752 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -189,6 +189,14 @@ our $typeTypedefs = qr{(?x:
189 atomic_t 189 atomic_t
190)}; 190)};
191 191
192our $logFunctions = qr{(?x:
193 printk|
194 pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)|
195 dev_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)|
196 WARN|
197 panic
198)};
199
192our @typeList = ( 200our @typeList = (
193 qr{void}, 201 qr{void},
194 qr{(?:unsigned\s+)?char}, 202 qr{(?:unsigned\s+)?char},
@@ -1377,7 +1385,7 @@ sub process {
1377#80 column limit 1385#80 column limit
1378 if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && 1386 if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ &&
1379 $rawline !~ /^.\s*\*\s*\@$Ident\s/ && 1387 $rawline !~ /^.\s*\*\s*\@$Ident\s/ &&
1380 $line !~ /^\+\s*printk\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ && 1388 $line !~ /^\+\s*$logFunctions\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ &&
1381 $length > 80) 1389 $length > 80)
1382 { 1390 {
1383 WARN("line over 80 characters\n" . $herecurr); 1391 WARN("line over 80 characters\n" . $herecurr);