From 38d7e4fc9e019d759f50c0b2cb3148edd91d9f46 Mon Sep 17 00:00:00 2001 From: Tony Lu Date: Wed, 25 Nov 2020 20:54:37 +0800 Subject: [PATCH 2422/2944] alinux: virtio_net: fix wrong print format type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix #23955192 During compiling virtio_net module, the compiler prints: drivers/net/virtio_net.c: In function ‘virtnet_tx_timeout’: drivers/net/virtio_net.c:2540:53: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 4 has type ‘char *’ [-Wformat=] netdev_warn(dev, "TX timeout on queue: %d, sq: 0x%x, vq: 0x%x, name: %s, usecs since last trans: %u\n", This patch fix wrong print format when virtnet_tx_timeout is called, and mute the compiler warning message. sq->name should be printed as string not unsigned int. Fixes: a3a8bfb13a433 ("alinux: virtio_net: introduce TX timeout dev_watchdog handler") Signed-off-by: Tony Lu Acked-by: Dust Li --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index c988482..8a3db47 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2537,7 +2537,7 @@ static void virtnet_tx_timeout(struct net_device *dev) sq->stats.tx_timeouts++; u64_stats_update_end(&sq->stats.syncp); - netdev_warn(dev, "TX timeout on queue: %d, sq: 0x%x, vq: 0x%x, name: %s, usecs since last trans: %u\n", + netdev_warn(dev, "TX timeout on queue: %d, sq: %s, vq: 0x%x, name: %s, usecs since last trans: %u\n", i, sq->name, sq->vq->index, sq->vq->name, jiffies_to_usecs(jiffies - dev_queue->trans_start)); } -- 1.8.3.1