From: Wei Yongjun Date: Thu, 6 Sep 2012 04:38:59 +0000 (+0800) Subject: staging: wlags49_h2: use list_move instead of list_del/list_add X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=84bda909312a5df79cddad875ea6b468cf18da03;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: wlags49_h2: use list_move instead of list_del/list_add 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c index dde63279da56..cc5614137f78 100644 --- a/drivers/staging/wlags49_h2/wl_netdev.c +++ b/drivers/staging/wlags49_h2/wl_netdev.c @@ -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 ) {