[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1381837514-50660-17-git-send-email-wangkefeng.wang@huawei.com>
Date: Tue, 15 Oct 2013 19:45:12 +0800
From: Kefeng Wang <wangkefeng.wang@...wei.com>
To: <linux-kernel@...r.kernel.org>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"David S. Miller" <davem@...emloft.net>,
Pablo Neira Ayuso <pablo@...filter.org>,
"Stephen Hemminger" <stephen@...workplumber.org>,
Johannes Berg <johannes@...solutions.net>,
"John W. Linville" <linville@...driver.com>,
Stanislaw Gruszka <sgruszka@...hat.com>,
Johannes Berg <johannes.berg@...el.com>,
Francois Romieu <romieu@...zoreil.com>,
"Ben Hutchings" <bhutchings@...arflare.com>,
Chas Williams <chas@....nrl.navy.mil>,
Marc Kleine-Budde <mkl@...gutronix.de>,
Samuel Ortiz <samuel@...tiz.org>,
Paul Mackerras <paulus@...ba.org>,
Oliver Neukum <oneukum@...e.de>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
"Boris Ostrovsky" <boris.ostrovsky@...cle.com>,
David Vrabel <david.vrabel@...rix.com>,
Rusty Russell <rusty@...tcorp.com.au>,
"Michael S. Tsirkin" <mst@...hat.com>, <netfilter@...r.kernel.org>,
<netdev@...r.kernel.org>, <linux-wireless@...r.kernel.org>,
<guohanjun@...wei.com>
Subject: [PATCH 16/18] net: virtio: use wrapper functions of net_ratelimit() to simplify code
net_ratelimited_function() is called to simplify code.
Signed-off-by: Kefeng Wang <wangkefeng.wang@...wei.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists