* [PATCH net-next] liquidio: use list_empty_careful in lio_list_delete_head
@ 2020-06-28 10:14 Geliang Tang
2020-06-29 4:46 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Geliang Tang @ 2020-06-28 10:14 UTC (permalink / raw)
To: Derek Chickles, Satanand Burla, Felix Manlunas, David S. Miller,
Jakub Kicinski
Cc: Geliang Tang, netdev, linux-kernel
Use list_empty_careful() instead of open-coding.
Signed-off-by: Geliang Tang <geliangtang@gmail.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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] liquidio: use list_empty_careful in lio_list_delete_head
2020-06-28 10:14 [PATCH net-next] liquidio: use list_empty_careful in lio_list_delete_head Geliang Tang
@ 2020-06-29 4:46 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-06-29 4:46 UTC (permalink / raw)
To: geliangtang; +Cc: dchickles, sburla, fmanlunas, kuba, netdev, linux-kernel
From: Geliang Tang <geliangtang@gmail.com>
Date: Sun, 28 Jun 2020 18:14:13 +0800
> Use list_empty_careful() instead of open-coding.
>
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Also applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-29 20:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-28 10:14 [PATCH net-next] liquidio: use list_empty_careful in lio_list_delete_head Geliang Tang
2020-06-29 4:46 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®