Skip to contentSkip to conversation

usbnet: silence an unnecessary warning

PATCH Applied Oliver Neukum 2 participants 2 messages Jan 17, 2018 – Jan 22, 2018

Subsystems (4)
lore
Share & tools
lore

Oliver Neukum

author maintainer
#0 lore raw

PATCH v2 1/1 usbnet: silence an unnecessary warning

That a kevent could not be scheduled is not an error. Such handlers must be able to deal with multiple events anyway. As the successful scheduling of a work is a debug event, make the failure debug priority, too.

V2: coding style

---
 drivers/net/usb/usbnet.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/net/usb/usbnet.c +3 -5
index d56fe32bf48d..8a22ff67b026 100644
@@ -457,12 +457,10 @@ static enum skb_state defer_bh(struct usbnet *dev, struct sk_buff *skb,
 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);
-	} else {
+	if (!schedule_work (&dev->kevent))
+		netdev_dbg(dev->net, "kevent %d may have been dropped\n", work);
+	else
 		netdev_dbg(dev->net, "kevent %d scheduled\n", work);
-	}
 }
 EXPORT_SYMBOL_GPL(usbnet_defer_kevent);
 
Signature · 1 line
2.13.6
maintainer Applied
#1 lore raw

From: Oliver Neukum <[email protected]>
Date: Wed, 17 Jan 2018 16:33:54 +0100

Quoted 9 lines

That a kevent could not be scheduled is not an error. Such handlers must be able to deal with multiple events anyway. As the successful scheduling of a work is a debug event, make the failure debug priority, too.

V2: coding style

Applied, thanks Oliver.