Patchwork [18/18] net: wimax: use wrapper functions of net_ratelimit() to simplify code

login
register
mail settings
Submitter Kefeng Wang
Date Oct. 15, 2013, 11:45 a.m.
Message ID <1381837514-50660-19-git-send-email-wangkefeng.wang@huawei.com>
Download mbox | patch
Permalink /patch/283604/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

Kefeng Wang - Oct. 15, 2013, 11:45 a.m.
net_ratelimited_function() is called to simplify code.

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

Patch

diff --git a/drivers/net/wimax/i2400m/netdev.c b/drivers/net/wimax/i2400m/netdev.c
index 4889613..678717a 100644
--- a/drivers/net/wimax/i2400m/netdev.c
+++ b/drivers/net/wimax/i2400m/netdev.c
@@ -305,8 +305,7 @@  int i2400m_net_wake_tx(struct i2400m *i2400m, struct net_device *net_dev,
 		 * queue -- blame the queue disciplines that
 		 * queue without looking -- I guess there is a reason
 		 * for that. */
-		if (net_ratelimit())
-			d_printf(1, dev, "NETTX: device exiting idle, "
+		net_ratelimited_function(d_printf, 1, dev, "NETTX: device exiting idle, "
 				 "dropping skb %p, queue running %d\n",
 				 skb, netif_queue_stopped(net_dev));
 		result = -EBUSY;