Patchwork [09/18] block: aoe: 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-10-git-send-email-wangkefeng.wang@huawei.com>
Download mbox | patch
Permalink /patch/283607/
State Changes Requested
Delegated to: David Miller
Headers show

Comments

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

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 drivers/block/aoe/aoenet.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch

diff --git a/drivers/block/aoe/aoenet.c b/drivers/block/aoe/aoenet.c
index 63773a9..25e8764 100644
--- a/drivers/block/aoe/aoenet.c
+++ b/drivers/block/aoe/aoenet.c
@@ -159,9 +159,7 @@  aoenet_rcv(struct sk_buff *skb, struct net_device *ifp, struct packet_type *pt,
 		n = h->err;
 		if (n > NECODES)
 			n = 0;
-		if (net_ratelimit())
-			printk(KERN_ERR
-				"%s%d.%d@%s; ecode=%d '%s'\n",
+		net_err_ratelimited("%s%d.%d@%s; ecode=%d '%s'\n",
 				"aoe: error packet from ",
 				get_unaligned_be16(&h->major),
 				h->minor, skb->dev->name,