diff options
author | Dario Binacchi <dario.binacchi@amarulasolutions.com> | 2022-06-28 18:31:26 +0200 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2022-07-03 11:34:18 +0200 |
commit | da6788ea025c62343fec81f92409012d82096a09 (patch) | |
tree | d6fd953cd12e2d4a603d82d382ba772ee11a946b /drivers/net/can/slcan.c | |
parent | 3cd864901bc5d5aa2bd38533dcd63d2bf2387030 (diff) | |
download | lwn-da6788ea025c62343fec81f92409012d82096a09.tar.gz lwn-da6788ea025c62343fec81f92409012d82096a09.zip |
can: slcan: use netdev helpers to print out messages
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>
Diffstat (limited to 'drivers/net/can/slcan.c')
-rw-r--r-- | drivers/net/can/slcan.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/can/slcan.c b/drivers/net/can/slcan.c index b37d35c2a23a..6162a9c21672 100644 --- a/drivers/net/can/slcan.c +++ b/drivers/net/can/slcan.c @@ -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); |