From: Yogesh Chaudhari Date: Thu, 3 Apr 2014 21:49:23 +0000 (-0700) Subject: checkpatch.pl: modify warning message for printk usage X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=daa8b0592ee062583b2532bf62450c15fbcc7f98;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git 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: Yogesh Chaudhari Cc: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index f0ea8a037a6d..3d3ef2ff62b2 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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*\(/) {