summaryrefslogtreecommitdiff
path: root/include/linux/list.h
diff options
context:
space:
mode:
authorWei Yang <richard.weiyang@gmail.com>2024-02-08 05:14:23 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-02-23 02:38:55 +0300
commit2932fb0a927d30690b8cb70c71d511fd9054bb61 (patch)
treeb39171e28a32bec40f3b7c41d739a4e541ea85f5 /include/linux/list.h
parent1b12e8bba11c8a7064d1ede210d967c114b2dd9e (diff)
downloadlinux-2932fb0a927d30690b8cb70c71d511fd9054bb61.tar.xz
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 <richard.weiyang@gmail.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'include/linux/list.h')
-rw-r--r--include/linux/list.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/list.h b/include/linux/list.h
index 523b7c4d000a..5f4b0a39cf46 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