aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBaokun Li <[email protected]>2021-06-08 03:10:41 +0000
committerJason Gunthorpe <[email protected]>2021-06-08 19:55:41 +0000
commitac477efcf0998c16a5be70f786b968cc1f973268 (patch)
tree045dc319d3d2f6950f651dc005854bd9dc26d011
parentRDMA/core: Use refcount_t instead of atomic_t on refcount of ib_uverbs_device (diff)
downloadkernel-ac477efcf0998c16a5be70f786b968cc1f973268.tar.gz
kernel-ac477efcf0998c16a5be70f786b968cc1f973268.zip
RDMA/irdma: Use list_move instead of list_del/list_add
Using list_move() instead of list_del() + list_add(). Link: https://lore.kernel.org/r/[email protected] Reported-by: Hulk Robot <[email protected]> Signed-off-by: Baokun Li <[email protected]> Acked-by: Shiraz Saleem <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
-rw-r--r--drivers/infiniband/hw/irdma/puda.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/irdma/puda.c b/drivers/infiniband/hw/irdma/puda.c
index 18057139817d..c0be6e37d425 100644
--- a/drivers/infiniband/hw/irdma/puda.c
+++ b/drivers/infiniband/hw/irdma/puda.c
@@ -1420,8 +1420,7 @@ irdma_ieq_handle_partial(struct irdma_puda_rsrc *ieq, struct irdma_pfpdu *pfpdu,
error:
while (!list_empty(&pbufl)) {
buf = (struct irdma_puda_buf *)(pbufl.prev);
- list_del(&buf->list);
- list_add(&buf->list, rxlist);
+ list_move(&buf->list, rxlist);
}
if (txbuf)
irdma_puda_ret_bufpool(ieq, txbuf);