lkml.org 
[lkml]   [2009]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] checkpatch.pl: Warn on pr_<level> or dev_<level> with KERN_<level>
From
Date
On Wed, 2009-12-09 at 07:05 +0100, Ingo Molnar wrote:
> ( Andy: i suspect checkpatch could also grow a new warning perhaps, the
> '\<pr_.*(KERN_.*' pattern will i suspect pinpoint something fishy in
> most cases. )

Signed-off-by: Joe Perches <joe@perches.com>
---
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index bc4114f..ffd8210 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1832,6 +1832,12 @@ sub process {
}
}

+# pr_<level> and dev_<level> should not use KERN_* levels
+
+ if ($line =~ /\b(pr_|dev_)[a-z]+.*KERN_/) {
+ WARN("pr_<level>() and dev_<level> should not include KERN_ facility level\n" . $herecurr);
+ }
+
# function brace can't be on same line, except for #defines of do while,
# or if closed on same line
if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and



\
 
 \ /
  Last update: 2009-12-09 07:53    [W:0.058 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site