public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] scripts/checkpatch.pl: to give more detailed warning message in case printk is used in any patch
@ 2014-03-02 15:01 Yogesh Chaudhari
  2014-03-02 15:14 ` Joe Perches
  2014-03-02 15:20 ` Levente Kurusa
  0 siblings, 2 replies; 8+ messages in thread
From: Yogesh Chaudhari @ 2014-03-02 15:01 UTC (permalink / raw)
  To: LKML; +Cc: joe, apw

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@gmail.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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-03-02 18:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-02 15:01 [PATCH 1/1] scripts/checkpatch.pl: to give more detailed warning message in case printk is used in any patch Yogesh Chaudhari
2014-03-02 15:14 ` Joe Perches
2014-03-02 15:20 ` Levente Kurusa
     [not found]   ` <CAAOfnZqjVn5_aTU3fQQmOF8MqOb5NqXS5Yg4gb-Sec+Qm_0dEQ@mail.gmail.com>
2014-03-02 15:34     ` Levente Kurusa
2014-03-02 15:40   ` Joe Perches
2014-03-02 15:49     ` Levente Kurusa
2014-03-02 16:21       ` Yogesh Chaudhari
2014-03-02 18:54         ` Joe Perches

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox