[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <cec4b86f5c19d84addb42a56f6dddbf045995431.1593339093.git.geliangtang@gmail.com>
Date: Sun, 28 Jun 2020 18:14:13 +0800
From: Geliang Tang <geliangtang@...il.com>
To: Derek Chickles <dchickles@...vell.com>,
Satanand Burla <sburla@...vell.com>,
Felix Manlunas <fmanlunas@...vell.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Cc: Geliang Tang <geliangtang@...il.com>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH net-next] liquidio: use list_empty_careful in lio_list_delete_head
Use list_empty_careful() instead of open-coding.
Signed-off-by: Geliang Tang <geliangtang@...il.com>
---
drivers/net/ethernet/cavium/liquidio/octeon_network.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/octeon_network.h b/drivers/net/ethernet/cavium/liquidio/octeon_network.h
index 50201fc86dcf..ebe56bd8849b 100644
--- a/drivers/net/ethernet/cavium/liquidio/octeon_network.h
+++ b/drivers/net/ethernet/cavium/liquidio/octeon_network.h
@@ -612,7 +612,7 @@ static inline struct list_head *lio_list_delete_head(struct list_head *root)
{
struct list_head *node;
- if (root->prev == root && root->next == root)
+ if (list_empty_careful(root))
node = NULL;
else
node = root->next;
--
2.17.1
Powered by blists - more mailing lists