Skip to content

Commit 2932fb0

Browse files
RichardWeiYangakpm00
authored andcommitted
list: leverage list_is_head() for list_entry_is_head()
This is what list_is_head() exactly do. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Wei Yang <[email protected]> Cc: Andy Shevchenko <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 1b12e8b commit 2932fb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ static inline size_t list_count_nodes(struct list_head *head)
766766
* @member: the name of the list_head within the struct.
767767
*/
768768
#define list_entry_is_head(pos, head, member) \
769-
(&pos->member == (head))
769+
list_is_head(&pos->member, (head))
770770

771771
/**
772772
* list_for_each_entry - iterate over list of given type

0 commit comments

Comments
 (0)