Skip to content

Commit 2b010a6

Browse files
author
Kent Overstreet
committed
preempt.h: Kill dependency on list.h
We really only need types.h, list.h is big. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
1 parent 932562a commit 2b010a6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

include/linux/preempt.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include <linux/linkage.h>
1111
#include <linux/cleanup.h>
12-
#include <linux/list.h>
12+
#include <linux/types.h>
1313

1414
/*
1515
* We put the hardirq and softirq counter into the preemption
@@ -360,7 +360,9 @@ void preempt_notifier_unregister(struct preempt_notifier *notifier);
360360
static inline void preempt_notifier_init(struct preempt_notifier *notifier,
361361
struct preempt_ops *ops)
362362
{
363-
INIT_HLIST_NODE(&notifier->link);
363+
/* INIT_HLIST_NODE() open coded, to avoid dependency on list.h */
364+
notifier->link.next = NULL;
365+
notifier->link.pprev = NULL;
364366
notifier->ops = ops;
365367
}
366368

0 commit comments

Comments
 (0)