summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2020-06-28 18:14:13 +0800
committerDavid S. Miller <davem@davemloft.net>2020-06-28 21:46:33 -0700
commitb8483ecaf72ee9059dcca5de969781028a550f89 (patch)
treeb9dee8b96d88fb37f676ad572f35be7ace1560f5
parent6fc3e68f5b35c4861b28733fa32f636db7188746 (diff)
liquidio: use list_empty_careful in lio_list_delete_head
Use list_empty_careful() instead of open-coding. Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/ethernet/cavium/liquidio/octeon_network.h2
1 files changed, 1 insertions, 1 deletions
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;