Skip to content

Commit

Permalink
llist: Move llist_{head,node} definition to types.h
Browse files Browse the repository at this point in the history
llist_head and llist_node can be used by very primitives. For example,
Dept for tracking dependency uses llist things in its header. To avoid
header dependency, move those to types.h.

Signed-off-by: Byungchul Park <byungchul.park@lge.com>
  • Loading branch information
lgebyungchulpark authored and intel-lab-lkp committed Jan 9, 2023
1 parent 4282494 commit a82b5dd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions include/linux/llist.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 8 additions & 0 deletions include/linux/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,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
Expand Down

0 comments on commit a82b5dd

Please sign in to comment.