[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAAOfnZp-KAFo8Q4bBW7oxe8BgUn+bSDAWuHbK6E+SF0X0Ex=Wg@mail.gmail.com>
Date: Sun, 2 Mar 2014 20:31:18 +0530
From: Yogesh Chaudhari <mr.yogesh@...il.com>
To: LKML <linux-kernel@...r.kernel.org>
Cc: joe@...ches.com, apw@...onical.com
Subject: [PATCH 1/1] scripts/checkpatch.pl: to give more detailed warning
message in case printk is used in any patch
Based on the discussion here:
https://lkml.org/lkml/2014/3/2/17
I would like to propose this patch to improve the warning message in
checkpatch.pl. Comments/Suggestions on possible improvements are
welcome.
=========================================================
This patch modifies scripts/checkpatch.pl to give more detailed
warning message in case printk is used in any patch.
Signed-off-by: Yogesh Chaudhari <mr.yogesh@...il.com>
---
scripts/checkpatch.pl | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 464dcef..526f33aa 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2799,7 +2799,10 @@ 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);
+ "Order of preference for printing debug messages:
+ 1. [subsystem]_$level2([subsystem]dev, ... eg
netdev_$level2(netdev, ... for netdevice object
+ 2. dev_$level2(dev, ... for drivers with struct device
+ 3. pr_$level(... to printk(KERN_$orig ...\n" . $herecurr);
}
if ($line =~ /\bpr_warning\s*\(/) {
--
DREAM IT, CODE IT
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists