bnx2x: use list_move instead of list_del/list_add
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 11 Mar 2013 04:40:14 +0000 (04:40 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Mar 2013 12:04:08 +0000 (08:04 -0400)
Using list_move() instead of list_del() + list_add().

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Ariel Elior <ariele@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c

index df930e30e1b1d2451b16949f456f4cdb5d0ca53f..faadd153f7adfbef2e00c13a25e27913ac17a8d0 100644 (file)
@@ -557,8 +557,7 @@ static int bnx2x_vfop_config_list(struct bnx2x *bp,
                rc = bnx2x_config_vlan_mac(bp, vlan_mac);
                if (rc >= 0) {
                        cnt += pos->add ? 1 : -1;
-                       list_del(&pos->link);
-                       list_add(&pos->link, &rollback_list);
+                       list_move(&pos->link, &rollback_list);
                        rc = 0;
                } else if (rc == -EEXIST) {
                        rc = 0;