Skip to content

Commit 7933aa5

Browse files
Wei Yongjundavem330
authored andcommitted
bnx2x: use list_move_tail instead of list_del/list_add_tail
Using list_move_tail() instead of list_del() + list_add_tail(). spatch with a semantic match is used to found this problem. (http://coccinelle.lip6.fr/) Signed-off-by: Wei Yongjun <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2c96932 commit 7933aa5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,8 +229,7 @@ static inline int bnx2x_exe_queue_step(struct bnx2x *bp,
229229
*/
230230
list_add_tail(&spacer.link, &o->pending_comp);
231231
mb();
232-
list_del(&elem->link);
233-
list_add_tail(&elem->link, &o->pending_comp);
232+
list_move_tail(&elem->link, &o->pending_comp);
234233
list_del(&spacer.link);
235234
} else
236235
break;

0 commit comments

Comments
 (0)