Skip to contentSkip to conversation

: Use skb_queue_walk_safe() in usbnet.

PATCH New David Miller 1 participant 1 message Sep 23, 2008

Subsystems (4)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 1/1 : Use skb_queue_walk_safe() in usbnet.

More work towards making sk_buff list_head transition easier.

usbnet: Use skb_queue_walk_safe() instead of by-hand implementation.

---
 drivers/net/usb/usbnet.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/usb/usbnet.c +1 -2
index 8463efb..02d25c7 100644
@@ -512,14 +512,13 @@ static int unlink_urbs (struct usbnet *dev, struct sk_buff_head *q)
 	int			count = 0;
 
 	spin_lock_irqsave (&q->lock, flags);
-	for (skb = q->next; skb != (struct sk_buff *) q; skb = skbnext) {
+	skb_queue_walk_safe(q, skb, skbnext) {
 		struct skb_data		*entry;
 		struct urb		*urb;
 		int			retval;
 
 		entry = (struct skb_data *) skb->cb;
 		urb = entry->urb;
-		skbnext = skb->next;
 
 		// during some PM-driven resume scenarios,
 		// these (async) unlinks complete immediately
Signature · 1 line
1.5.6.5