From 2932fb0a927d30690b8cb70c71d511fd9054bb61 Mon Sep 17 00:00:00 2001 From: Wei Yang Date: Thu, 8 Feb 2024 02:14:23 +0000 Subject: [PATCH] list: leverage list_is_head() for list_entry_is_head() This is what list_is_head() exactly do. Link: https://lkml.kernel.org/r/20240208021423.15704-1-richard.weiyang@gmail.com Signed-off-by: Wei Yang Cc: Andy Shevchenko Signed-off-by: Andrew Morton --- 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 523b7c4d000a1..5f4b0a39cf46a 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.30.2