aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/sfc
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-01-08 16:59:07 -0500
committerDavid S. Miller <davem@davemloft.net>2020-01-08 15:19:55 -0800
commit69b4ed5cbff54b8279f53a65da111e8d0cc01405 (patch)
tree98e485b2135ccb1c9ea5e43c3d5dfa59c4545f21 /drivers/net/ethernet/sfc
parentnet: sunvnet: use skb_list_walk_safe helper for gso segments (diff)
downloadlinux-dev-69b4ed5cbff54b8279f53a65da111e8d0cc01405.tar.xz
linux-dev-69b4ed5cbff54b8279f53a65da111e8d0cc01405.zip
net: sfc: use skb_list_walk_safe helper for gso segments
This is a straight-forward conversion case for the new function, and while we're at it, we can remove a null write to skb->next by replacing it with skb_mark_not_on_list. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/sfc')
-rw-r--r--drivers/net/ethernet/sfc/tx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
index c9599fcab0b4..e4f0f5c94589 100644
--- a/drivers/net/ethernet/sfc/tx.c
+++ b/drivers/net/ethernet/sfc/tx.c
@@ -307,12 +307,9 @@ static int efx_tx_tso_fallback(struct efx_tx_queue *tx_queue,
dev_consume_skb_any(skb);
skb = segments;
- while (skb) {
- next = skb->next;
- skb->next = NULL;
-
+ skb_list_walk_safe(skb, skb, next) {
+ skb_mark_not_on_list(skb);
efx_enqueue_skb(tx_queue, skb);
- skb = next;
}
return 0;