Thread (44 messages) 44 messages, 1 author, 2025-07-25
STALE320d
Revisions (11)
  1. v10 [diff vs current]
  2. v10 [diff vs current]
  3. v10 [diff vs current]
  4. v11 [diff vs current]
  5. v12 [diff vs current]
  6. v13 [diff vs current]
  7. v14 [diff vs current]
  8. v15 [diff vs current]
  9. v16 current
  10. v17 [diff vs current]
  11. v18 [diff vs current]

[PATCH v16 01/42] llist: move llist_{head,node} definition to types.h

From: Byungchul Park <byungchul@sk.com>
Date: 2025-05-19 09:18:44
Also in: dri-devel, linux-block, linux-fsdevel, linux-ide, linux-mm, lkml, netdev
Subsystem: the rest · Maintainer: Linus Torvalds

llist_head and llist_node can be used by some other header files.  For
example, dept for tracking dependencies uses llist in its header.  To
avoid header dependency, move them to types.h.

Signed-off-by: Byungchul Park <byungchul@sk.com>
---
 include/linux/llist.h | 8 --------
 include/linux/types.h | 8 ++++++++
 2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/include/linux/llist.h b/include/linux/llist.h
index 2c982ff7475a..3ac071857612 100644
--- a/include/linux/llist.h
+++ b/include/linux/llist.h
@@ -53,14 +53,6 @@
 #include <linux/stddef.h>
 #include <linux/types.h>
 
-struct llist_head {
-	struct llist_node *first;
-};
-
-struct llist_node {
-	struct llist_node *next;
-};
-
 #define LLIST_HEAD_INIT(name)	{ NULL }
 #define LLIST_HEAD(name)	struct llist_head name = LLIST_HEAD_INIT(name)
 
diff --git a/include/linux/types.h b/include/linux/types.h
index 49b79c8bb1a9..c727cc2249e8 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -204,6 +204,14 @@ struct hlist_node {
 	struct hlist_node *next, **pprev;
 };
 
+struct llist_head {
+	struct llist_node *first;
+};
+
+struct llist_node {
+	struct llist_node *next;
+};
+
 struct ustat {
 	__kernel_daddr_t	f_tfree;
 #ifdef CONFIG_ARCH_32BIT_USTAT_F_TINODE
-- 
2.17.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help