ethernet: Convert dev_printk(KERN_<LEVEL> to dev_<level>(
authorJoe Perches <joe@perches.com>
Sat, 27 Oct 2012 22:05:48 +0000 (22:05 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 31 Oct 2012 18:02:45 +0000 (14:02 -0400)
dev_<level> calls take less code than dev_printk(KERN_<LEVEL>
and reducing object size is good.
Coalesce formats for easier grep.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/chelsio/cxgb3/common.h
drivers/net/ethernet/marvell/pxa168_eth.c

index df01b63432415800e418b2df97e8462c85cbcfb8..8c82248ce41624156b2e429b6b716fae013e00bc 100644 (file)
 #include <linux/mdio.h>
 #include "version.h"
 
-#define CH_ERR(adap, fmt, ...)   dev_err(&adap->pdev->dev, fmt, ## __VA_ARGS__)
-#define CH_WARN(adap, fmt, ...)  dev_warn(&adap->pdev->dev, fmt, ## __VA_ARGS__)
-#define CH_ALERT(adap, fmt, ...) \
-       dev_printk(KERN_ALERT, &adap->pdev->dev, fmt, ## __VA_ARGS__)
+#define CH_ERR(adap, fmt, ...)   dev_err(&adap->pdev->dev, fmt, ##__VA_ARGS__)
+#define CH_WARN(adap, fmt, ...)  dev_warn(&adap->pdev->dev, fmt, ##__VA_ARGS__)
+#define CH_ALERT(adap, fmt, ...) dev_alert(&adap->pdev->dev, fmt, ##__VA_ARGS__)
 
 /*
  * More powerful macro that selectively prints messages based on msg_enable.
index 59489722e898aa1e517959855c7c7561f858ba65..10d678d3dd018bf40d4ca857459de4c81cd438d6 100644 (file)
@@ -1131,7 +1131,7 @@ static int pxa168_eth_open(struct net_device *dev)
        err = request_irq(dev->irq, pxa168_eth_int_handler,
                          IRQF_DISABLED, dev->name, dev);
        if (err) {
-               dev_printk(KERN_ERR, &dev->dev, "can't assign irq\n");
+               dev_err(&dev->dev, "can't assign irq\n");
                return -EAGAIN;
        }
        pep->rx_resource_err = 0;
@@ -1201,9 +1201,8 @@ static int pxa168_eth_change_mtu(struct net_device *dev, int mtu)
         */
        pxa168_eth_stop(dev);
        if (pxa168_eth_open(dev)) {
-               dev_printk(KERN_ERR, &dev->dev,
-                          "fatal error on re-opening device after "
-                          "MTU change\n");
+               dev_err(&dev->dev,
+                       "fatal error on re-opening device after MTU change\n");
        }
 
        return 0;