checkpatch.pl: modify warning message for printk usage
authorYogesh Chaudhari <mr.yogesh@gmail.com>
Thu, 3 Apr 2014 21:49:23 +0000 (14:49 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 3 Apr 2014 23:21:14 +0000 (16:21 -0700)
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: Yogesh Chaudhari <mr.yogesh@gmail.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
scripts/checkpatch.pl

index f0ea8a0..3d3ef2f 100755 (executable)
@@ -2833,7 +2833,7 @@ sub process {
                        my $level2 = $level;
                        $level2 = "dbg" if ($level eq "debug");
                        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*\(/) {