OSDN Git Service

Staging: slicoss: Replace printk() with pr_debug() or dev_dbg() as required
authorRashika Kheria <rashika.kheria@gmail.com>
Sat, 19 Oct 2013 07:45:53 +0000 (13:15 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Oct 2013 21:45:08 +0000 (14:45 -0700)
This patch fixes the following checkpatch.pl warning in slicoss.c:
WARNING: Prefer netdev_dbg(netdev, ... then dev_dbg(dev, ... then
pr_debug(...  to printk(KERN_DEBUG ...

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/slicoss/slicoss.c

index 363f7b3..561011a 100644 (file)
@@ -62,6 +62,7 @@
 #define SLIC_OFFLOAD_IP_CHECKSUM               1
 #define STATS_TIMER_INTERVAL                   2
 #define PING_TIMER_INTERVAL                        1
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
 #include <linux/kernel.h>
 #include <linux/string.h>
@@ -3636,8 +3637,8 @@ static int slic_entry_probe(struct pci_dev *pcidev,
                return err;
 
        if (slic_debug > 0 && did_version++ == 0) {
-               printk(KERN_DEBUG "%s\n", slic_banner);
-               printk(KERN_DEBUG "%s\n", slic_proc_version);
+               dev_dbg(&pcidev->dev, "%s\n", slic_banner);
+               dev_dbg(&pcidev->dev, "%s\n", slic_proc_version);
        }
 
        if (!pci_set_dma_mask(pcidev, DMA_BIT_MASK(64))) {
@@ -3767,8 +3768,7 @@ static int __init slic_module_init(void)
        slic_init_driver();
 
        if (debug >= 0 && slic_debug != debug)
-               printk(KERN_DEBUG KBUILD_MODNAME ": debug level is %d.\n",
-                      debug);
+               pr_debug("debug level is %d.\n", debug);
        if (debug >= 0)
                slic_debug = debug;