]> git.baikalelectronics.ru Git - kernel.git/commitdiff
can: slcan: use netdev helpers to print out messages
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Tue, 28 Jun 2022 16:31:26 +0000 (18:31 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Sun, 3 Jul 2022 09:34:18 +0000 (11:34 +0200)
Replace printk() calls with corresponding netdev helpers.

Link: https://lore.kernel.org/all/20220628163137.413025-3-dario.binacchi@amarulasolutions.com
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Tested-by: Jeroen Hofstee <jhofstee@victronenergy.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/slcan.c

index b37d35c2a23ac8b34bd1591094d4e1485eadcb60..6162a9c21672cb97b89cb6510e4b16a4e1d818ff 100644 (file)
@@ -365,7 +365,7 @@ static netdev_tx_t slc_xmit(struct sk_buff *skb, struct net_device *dev)
        spin_lock(&sl->lock);
        if (!netif_running(dev))  {
                spin_unlock(&sl->lock);
-               printk(KERN_WARNING "%s: xmit: iface is down\n", dev->name);
+               netdev_warn(dev, "xmit: iface is down\n");
                goto out;
        }
        if (sl->tty == NULL) {
@@ -776,8 +776,7 @@ static void __exit slcan_exit(void)
 
                sl = netdev_priv(dev);
                if (sl->tty) {
-                       printk(KERN_ERR "%s: tty discipline still running\n",
-                              dev->name);
+                       netdev_err(dev, "tty discipline still running\n");
                }
 
                unregister_netdev(dev);