Re: [PATCH 14/18] net: usb: use wrapper functions of net_ratelimit() to simplify code

From
Kefeng Wang <hidden>
Date
2013-10-16 03:29:18
Also in
lkml, netdev
Reply to
Sergei Shtylyov, 2013-10-15
Thanks for you reply.
On 10/16 3:06, Sergei Shtylyov wrote:
Hello.

On 10/15/2013 03:45 PM, Kefeng Wang wrote:
quoted
net_ratelimited_function() is called to simplify code.
quoted
Signed-off-by: Kefeng Wang <redacted>
---
  drivers/net/usb/usbnet.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
quoted
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index bf94e10..edf81de 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -450,8 +450,8 @@ void usbnet_defer_kevent (struct usbnet *dev, int work)
  {
      set_bit (work, &dev->flags);
      if (!schedule_work (&dev->kevent)) {
-        if (net_ratelimit())
-            netdev_err(dev->net, "kevent %d may have been dropped\n", work);
+        net_ratelimited_function(netdev_err, dev->net,
+            "kevent %d may have been dropped\n", work);
   The continuation line should start under 'netdev_err'. Same about the other patches where you didn't change the indentation of the continuation lines though you should have.
Got it, indentation will be changed.
WBR, Sergei


.
  
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