* [PATCH] infiniband: nes: Fix more direct skb list accesses.
@ 2018-11-10 5:19 David Miller
0 siblings, 0 replies; only message in thread
From: David Miller @ 2018-11-10 5:19 UTC (permalink / raw)
To: netdev
The following:
skb = skb->next;
...
if (skb == (struct sk_buff *)queue)
is transformed into:
skb = skb_peek_next(skb, queue);
...
if (!skb)
Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/infiniband/hw/nes/nes_mgt.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/infiniband/hw/nes/nes_mgt.c b/drivers/infiniband/hw/nes/nes_mgt.c
index e96ffff61c3a..fc0c191014e9 100644
--- a/drivers/infiniband/hw/nes/nes_mgt.c
+++ b/drivers/infiniband/hw/nes/nes_mgt.c
@@ -223,11 +223,11 @@ static struct sk_buff *nes_get_next_skb(struct nes_device *nesdev, struct nes_qp
}
old_skb = skb;
- skb = skb->next;
+ skb = skb_peek_next(skb, &nesqp->pau_list);
skb_unlink(old_skb, &nesqp->pau_list);
nes_mgt_free_skb(nesdev, old_skb, PCI_DMA_TODEVICE);
nes_rem_ref_cm_node(nesqp->cm_node);
- if (skb == (struct sk_buff *)&nesqp->pau_list)
+ if (!skb)
goto out;
}
return skb;
--
2.19.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-11-10 15:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-10 5:19 [PATCH] infiniband: nes: Fix more direct skb list accesses David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).