All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: liquidio: list usage cleanup
@ 2018-09-26  8:56 zhong jiang
  2018-09-26 17:14 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: zhong jiang @ 2018-09-26  8:56 UTC (permalink / raw)
  To: davem
  Cc: derek.chickles, satananda.burla, felix.manlunas, netdev, linux-kernel

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>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] net: liquidio: list usage cleanup
  2018-09-26  8:56 [PATCH] net: liquidio: list usage cleanup zhong jiang
@ 2018-09-26 17:14 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-09-26 17:14 UTC (permalink / raw)
  To: zhongjiang
  Cc: derek.chickles, satananda.burla, felix.manlunas, netdev, linux-kernel

From: zhong jiang <zhongjiang@huawei.com>
Date: Wed, 26 Sep 2018 16:56:50 +0800

> 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>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-26 17:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-26  8:56 [PATCH] net: liquidio: list usage cleanup zhong jiang
2018-09-26 17:14 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.