OSDN Git Service

net: liquidio: list usage cleanup
authorzhong jiang <zhongjiang@huawei.com>
Wed, 26 Sep 2018 08:56:50 +0000 (16:56 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Sep 2018 17:12:10 +0000 (10:12 -0700)
Trival cleanup, list_move_tail will implement the same function that
list_del() + list_add_tail() will do. hence just replace them.

Signed-off-by: zhong jiang <zhongjiang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/cavium/liquidio/octeon_device.c

index 0f0275c..ce8c3f8 100644 (file)
@@ -1044,8 +1044,7 @@ void octeon_delete_dispatch_list(struct octeon_device *oct)
                dispatch = &oct->dispatch.dlist[i].list;
                while (dispatch->next != dispatch) {
                        temp = dispatch->next;
-                       list_del(temp);
-                       list_add_tail(temp, &freelist);
+                       list_move_tail(temp, &freelist);
                }
 
                oct->dispatch.dlist[i].opcode = 0;