projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1b12e8b
)
list: leverage list_is_head() for list_entry_is_head()
author
Wei Yang
<richard.weiyang@gmail.com>
Thu, 8 Feb 2024 02:14:23 +0000
(
02:14
+0000)
committer
Andrew Morton
<akpm@linux-foundation.org>
Thu, 22 Feb 2024 23:38:55 +0000
(15:38 -0800)
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>
include/linux/list.h
patch
|
blob
|
history
diff --git
a/include/linux/list.h
b/include/linux/list.h
index 523b7c4d000a1f1da25226a9fc926fdb23ed270b..5f4b0a39cf46a3784a22e0319aa213551d7f4b2c 100644
(file)
--- 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