diff options
author | Joe Perches <joe@perches.com> | 2010-03-05 13:43:51 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-06 11:26:44 -0800 |
commit | 691e669ba8c64d31ac08d87b1751e6acfa3ff65e (patch) | |
tree | aaa04265a19b350a6292af1da60fc0870458f6a1 /scripts/checkpatch.pl | |
parent | 42bdf74c95b6935f3c09a09ba4bead6cad11b540 (diff) | |
download | linux-691e669ba8c64d31ac08d87b1751e6acfa3ff65e.tar.gz linux-691e669ba8c64d31ac08d87b1751e6acfa3ff65e.tar.bz2 linux-691e669ba8c64d31ac08d87b1751e6acfa3ff65e.zip |
checkpatch.pl: allow > 80 char lines for logging functions not just printk
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/checkpatch.pl')
-rwxr-xr-x | scripts/checkpatch.pl | 10 |
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: atomic_t )}; +our $logFunctions = qr{(?x: + printk| + pr_(debug|dbg|vdbg|devel|info|warning|err|notice|alert|crit|emerg|cont)| + dev_(printk|dbg|vdbg|info|warn|err|notice|alert|crit|emerg|WARN)| + WARN| + panic +)}; + our @typeList = ( qr{void}, qr{(?:unsigned\s+)?char}, @@ -1377,7 +1385,7 @@ sub process { #80 column limit if ($line =~ /^\+/ && $prevrawline !~ /\/\*\*/ && $rawline !~ /^.\s*\*\s*\@$Ident\s/ && - $line !~ /^\+\s*printk\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ && + $line !~ /^\+\s*$logFunctions\s*\(\s*(?:KERN_\S+\s*)?"[X\t]*"\s*(?:,|\)\s*;)\s*$/ && $length > 80) { WARN("line over 80 characters\n" . $herecurr); |