Skip to content

Commit

Permalink
staging: wlags49_h2: use list_move instead of list_del/list_add
Browse files Browse the repository at this point in the history
Using list_move() instead of list_del() + list_add().

spatch with a semantic match is used to found this problem.
(http://coccinelle.lip6.fr/)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Sep 6, 2012
1 parent f0290de commit 84bda90
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/wlags49_h2/wl_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,7 @@ int wl_tx( struct sk_buff *skb, struct net_device *dev, int port )
txF->frame.port = port;
/* Move the frame to the txQ */
/* NOTE: Here's where we would do priority queueing */
list_del( &( txF->node ));
list_add( &( txF->node ), &( lp->txQ[0] ));
list_move(&(txF->node), &(lp->txQ[0]));

lp->txQ_count++;
if( lp->txQ_count >= DEFAULT_NUM_TX_FRAMES ) {
Expand Down

0 comments on commit 84bda90

Please sign in to comment.