Skip to contentSkip to conversation

: rtl8187: Remove pointless check in rtl8187_rx_cb().

PATCH In review David Miller 3 participants 4 messages May 29, 2009 2 messages not in the archive

Subsystems (3)
lore
Share & tools
lore

David Miller

author maintainer
#0 lore raw

PATCH 4/10 : rtl8187: Remove pointless check in rtl8187_rx_cb().

First of all, it exposes the SKB list implementation.

Second of all it's not needed. If we get called here, we successfully enqueued the URB with the linked SKB and such a completion only gets called one time on such an SKB.

---
 drivers/net/wireless/rtl818x/rtl8187_dev.c |    7 +------
 1 files changed, 1 insertions(+), 6 deletions(-)
drivers/net/wireless/rtl818x/rtl8187_dev.c +1 -6
index 6499ccc..3f22cc0 100644
@@ -321,12 +321,7 @@ static void rtl8187_rx_cb(struct urb *urb)
 	unsigned long f;
 
 	spin_lock_irqsave(&priv->rx_queue.lock, f);
-	if (skb->next)
-		__skb_unlink(skb, &priv->rx_queue);
-	else {
-		spin_unlock_irqrestore(&priv->rx_queue.lock, f);
-		return;
-	}
+	__skb_unlink(skb, &priv->rx_queue);
 	spin_unlock_irqrestore(&priv->rx_queue.lock, f);
 	skb_put(skb, urb->actual_length);
 
Signature · 1 line
1.6.3

A message that is not in the archive (sent off-list or not yet received): 20090529.014011.244789664.davem-fT/PcQaiUtIeIZ0/[email protected]

#2 lore raw
Quoted 9 lines · David Miller

First of all, it exposes the SKB list implementation.

Second of all it's not needed. If we get called here, we successfully enqueued the URB with the linked SKB and such a completion only gets called one time on such an SKB.

ACK

Signature · 6 lines
John W. Linville		Someday the world will need a hero, and you
[email protected]			might be all we have.  Be ready.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 4 lines · John W. Linville
Quoted 3 lines · David Miller

First of all, it exposes the SKB list implementation.

Quoted 8 lines
Quoted 6 lines

Second of all it's not needed. If we get called here, we successfully enqueued the URB with the linked SKB and such a completion only gets called one time on such an SKB.

ACK

ACK.

I'll give this a try when I rebuild the rtl8187 module on my box.

Hin-Tak
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author maintainer
#5 lore raw

From: Hin-Tak Leung <[email protected]>
Date: Fri, 29 May 2009 16:41:20 +0100

Quoted 1 line

I'll give this a try when I rebuild the rtl8187 module on my box.

Thank you.