net_ratelimited_function() is called to simplify code.

Signed-off-by: Kefeng Wang <wangkefeng.w...@huawei.com>
---
 drivers/net/virtio_net.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index defec2b..4f63c12 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -753,8 +753,7 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, struct 
net_device *dev)
        /* This should not happen! */
        if (unlikely(err)) {
                dev->stats.tx_fifo_errors++;
-               if (net_ratelimit())
-                       dev_warn(&dev->dev,
+               net_ratelimited_function(dev_warn, &dev->dev,
                                 "Unexpected TXQ (%d) queue failure: %d\n", 
qnum, err);
                dev->stats.tx_dropped++;
                kfree_skb(skb);
-- 
1.8.2.1


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to