Commit daa8b059 authored by Yogesh Chaudhari's avatar Yogesh Chaudhari Committed by Linus Torvalds

checkpatch.pl: modify warning message for printk usage

Modify warning message when printk is used in a patch.  It mentions to
use subsystem_dbg instead of netdev_dbg as the first preferred format of
logging debug messages.
Signed-off-by: default avatarYogesh Chaudhari <mr.yogesh@gmail.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5b9553ab
...@@ -2833,7 +2833,7 @@ sub process { ...@@ -2833,7 +2833,7 @@ sub process {
my $level2 = $level; my $level2 = $level;
$level2 = "dbg" if ($level eq "debug"); $level2 = "dbg" if ($level eq "debug");
WARN("PREFER_PR_LEVEL", WARN("PREFER_PR_LEVEL",
"Prefer netdev_$level2(netdev, ... then dev_$level2(dev, ... then pr_$level(... to printk(KERN_$orig ...\n" . $herecurr); "Prefer [subsystem eg: netdev]_$level2([subsystem]dev, ... then dev_$level2(dev, ... then pr_$level(... to printk(KERN_$orig ...\n" . $herecurr);
} }
if ($line =~ /\bpr_warning\s*\(/) { if ($line =~ /\bpr_warning\s*\(/) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment