[PATCH] list: leverage list_is_head() for list_entry_is_head()

Wei Yang posted 1 patch 2 years ago
include/linux/list.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] list: leverage list_is_head() for list_entry_is_head()
Posted by Wei Yang 2 years ago
This is what list_is_head() exactly do.

Signed-off-by: Wei Yang <richard.weiyang@gmail.com>
CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
CC: Andrew Morton <akpm@linux-foundation.org>
---
 include/linux/list.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/list.h b/include/linux/list.h
index 059aa1fff41e..3dca3760f726 100644
--- a/include/linux/list.h
+++ b/include/linux/list.h
@@ -766,7 +766,7 @@ static inline size_t list_count_nodes(struct list_head *head)
  * @member:	the name of the list_head within the struct.
  */
 #define list_entry_is_head(pos, head, member)				\
-	(&pos->member == (head))
+	list_is_head(&pos->member, (head))
 
 /**
  * list_for_each_entry	-	iterate over list of given type
-- 
2.34.1