diff options
author | zhong jiang <zhongjiang@huawei.com> | 2018-09-26 16:53:00 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-26 10:11:36 -0700 |
commit | 631e871edc768210d5d5716f5787e4f363c65352 (patch) | |
tree | 8f5239a55486050142e8350e2748119b9397dac7 /drivers/net/ethernet/qlogic/qed/qed_iwarp.c | |
parent | 30b0594a3e6c2bcbe5bd59753d0319d6f9925e40 (diff) | |
download | linux-631e871edc768210d5d5716f5787e4f363c65352.tar.bz2 |
net: qed: list usage cleanup
Trival cleanup, list_move_tail will implement the same function that
list_del() + list_add_tail() will do. hence just replace them.
Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qed/qed_iwarp.c')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c index 17f3dfa2cc94..f99797a149a4 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c +++ b/drivers/net/ethernet/qlogic/qed/qed_iwarp.c @@ -935,9 +935,8 @@ qed_iwarp_return_ep(struct qed_hwfn *p_hwfn, struct qed_iwarp_ep *ep) } spin_lock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock); - list_del(&ep->list_entry); - list_add_tail(&ep->list_entry, - &p_hwfn->p_rdma_info->iwarp.ep_free_list); + list_move_tail(&ep->list_entry, + &p_hwfn->p_rdma_info->iwarp.ep_free_list); spin_unlock_bh(&p_hwfn->p_rdma_info->iwarp.iw_lock); } @@ -2270,8 +2269,8 @@ static void qed_iwarp_process_pending_pkts(struct qed_hwfn *p_hwfn) if (rc == -EBUSY) break; - list_del(&mpa_buf->list_entry); - list_add_tail(&mpa_buf->list_entry, &iwarp_info->mpa_buf_list); + list_move_tail(&mpa_buf->list_entry, + &iwarp_info->mpa_buf_list); if (rc) { /* different error, don't continue */ DP_NOTICE(p_hwfn, "process pkts failed rc=%d\n", rc); |