[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1537952210-6687-1-git-send-email-zhongjiang@huawei.com>
Date: Wed, 26 Sep 2018 16:56:50 +0800
From: zhong jiang <zhongjiang@...wei.com>
To: <davem@...emloft.net>
CC: <derek.chickles@...iumnetworks.com>,
<satananda.burla@...iumnetworks.com>,
<felix.manlunas@...iumnetworks.com>, <netdev@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] net: liquidio: list usage cleanup
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@...wei.com>
---
drivers/net/ethernet/cavium/liquidio/octeon_device.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_device.c b/drivers/net/ethernet/cavium/liquidio/octeon_device.c
index 0f0275c..ce8c3f8 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_device.c
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_device.c
@@ -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;
--
1.7.12.4
Powered by blists - more mailing lists