qed: Use list_move_tail instead of list_del/list_add_tail
Subsystems (3)
PATCH 1/1 qed: Use list_move_tail instead of list_del/list_add_tail
From: Wei Yongjun <[email protected]>
Using list_move_tail() instead of list_del() + list_add_tail().
Signed-off-by Wei Yongjun <[email protected]>
--- drivers/net/ethernet/qlogic/qed/qed_ll2.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-)
drivers/net/ethernet/qlogic/qed/qed_ll2.c +4 -7
@@ -537,8 +537,7 @@ void qed_ll2_rxq_flush(struct qed_hwfn *p_hwfn, u8 connection_handle)if (!p_pkt)break ; -list_del (&p_pkt->list_entry); -list_add_tail (&p_pkt->list_entry, &p_rx->free_descq); +list_move_tail (&p_pkt->list_entry, &p_rx->free_descq); rx_buf_addr = p_pkt->rx_buf_addr; cookie = p_pkt->cookie;
@@ -992,9 +991,8 @@ static void qed_ll2_post_rx_buffer_notify_fw(struct qed_hwfn *p_hwfn, p_posting_packet =list_first_entry (&p_rx->posting_descq, struct qed_ll2_rx_packet, list_entry); -list_del (&p_posting_packet->list_entry); -list_add_tail (&p_posting_packet->list_entry, - &p_rx->active_descq); +list_move_tail (&p_posting_packet->list_entry, + &p_rx->active_descq); b_notify_fw = true; }
@@ -1188,8 +1186,7 @@ static void qed_ll2_tx_packet_notify(struct qed_hwfn *p_hwfn,if (!p_pkt)break ; -list_del (&p_pkt->list_entry); -list_add_tail (&p_pkt->list_entry, &p_tx->active_descq); +list_move_tail (&p_pkt->list_entry, &p_tx->active_descq); }SET_FIELD (db_msg.params,CORE_DB_DATA_DEST ,DB_DEST_XCM );
Quoted 3 lines
Using
list_move_tail()instead oflist_del()+list_add_tail().Signed-off-by Wei Yongjun <[email protected]>
Thanks.
Acked-by Yuval Mintz <[email protected]>
From: "Mintz, Yuval" <[email protected]>
Date: Mon, 17 Oct 2016 19:10:10 +0000
Quoted 6 lines
Quoted 3 lines
Using
list_move_tail()instead oflist_del()+list_add_tail().Signed-off-by Wei Yongjun <[email protected]>Thanks.
Acked-by Yuval Mintz <[email protected]>
Applied, thanks.