<div dir="ltr"><div>Hi,<br>I am trying to fix a coding issue . I get the following warning when my module is checked with <a href="http://checkpatch.pl">checkpatch.pl</a>.<br></div>How can i remove the warning. I see a lot of drivers using printk() function.<br>
<div><br>$ perl ~/linux-stable/scripts/<a href="http://checkpatch.pl" target="_blank">checkpatch.pl</a> -f hello.c<br><div id=":mp" class="">
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then<br>
pr_debug(...  to printk(KERN_DEBUG ...<br>
#6: FILE: hello.c:6:<br>
+       printk(KERN_DEBUG &quot;Hello World!\n&quot;);<br>
<br>
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then<br>
pr_debug(...  to printk(KERN_DEBUG ...<br>
#12: FILE: hello.c:12:<br>
+       printk(KERN_DEBUG &quot;hello module unloaded\n&quot;);<br>
</div><br></div></div>