[PATCH 09/18] block: aoe: use wrapper functions of net_ratelimit() to simplify code

From
Kefeng Wang <hidden>
Date
2013-10-15 12:04:08
Also in
lkml, netdev
Reply to
Kefeng Wang, 2013-10-15
net_err_ratelimited() is called to simplify code.

Signed-off-by: Kefeng Wang <redacted>
---
 drivers/block/aoe/aoenet.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
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,
-- 
1.8.2.1

Thread (23 messages) 23 messages, 3 authors, last reply 2013-10-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help