Skip to contentSkip to conversation

sfc: elide assignment of skb

PATCH Applied Edward Cree 2 participants 2 messages Feb 18, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sfc: elide assignment of skb

Instead of assigning skb = segments before the loop, just pass
segments directly as the first argument to skb_list_walk_safe().

---
 drivers/net/ethernet/sfc/tx.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/sfc/tx.c +1 -2
index 04d7f41d7ed9..696a77c20cb7 100644
@@ -287,9 +287,8 @@ static int efx_tx_tso_fallback(struct efx_tx_queue *tx_queue,
 		return PTR_ERR(segments);
 
 	dev_consume_skb_any(skb);
-	skb = segments;
 
-	skb_list_walk_safe(skb, skb, next) {
+	skb_list_walk_safe(segments, skb, next) {
 		skb_mark_not_on_list(skb);
 		efx_enqueue_skb(tx_queue, skb);
 	}