]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
qedr: Use list_move_tail instead of list_del/list_add_tail
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 29 Oct 2016 16:19:53 +0000 (16:19 +0000)
committerDoug Ledford <dledford@redhat.com>
Wed, 14 Dec 2016 16:18:17 +0000 (11:18 -0500)
Using list_move_tail() instead of list_del() + list_add_tail().

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Acked-by: Ram Amrani <Ram.Amrani@cavium.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qedr/verbs.c

index 8c6c5ccaf57aedc508406f4e6775f419d3457fd6..18e2f60a9d4f286757e35cdf1b39124fb1b14c49 100644 (file)
@@ -2419,8 +2419,7 @@ static void handle_completed_mrs(struct qedr_dev *dev, struct mr_info *info)
                 */
                pbl = list_first_entry(&info->inuse_pbl_list,
                                       struct qedr_pbl, list_entry);
-               list_del(&pbl->list_entry);
-               list_add_tail(&pbl->list_entry, &info->free_pbl_list);
+               list_move_tail(&pbl->list_entry, &info->free_pbl_list);
                info->completed_handled++;
        }
 }