Short answer: Use pr_debug instead of printk.
On 5 Apr 2014 07:06, "HABI S RAVI" <habisbc@xxxxxxxxx> wrote:
Hi,How can i remove the warning. I see a lot of drivers using printk() function.
I am trying to fix a coding issue . I get the following warning when my module is checked with checkpatch.pl.
$ perl ~/linux-stable/scripts/checkpatch.pl -f hello.cWARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then
pr_debug(... to printk(KERN_DEBUG ...
#6: FILE: hello.c:6:
+ printk(KERN_DEBUG "Hello World!\n");
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then
pr_debug(... to printk(KERN_DEBUG ...
#12: FILE: hello.c:12:
+ printk(KERN_DEBUG "hello module unloaded\n");
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies