[PATCH v1 1/1] rbtree: Replace kernel.h with the necessary inclusions

From: Andy Shevchenko
Date: Fri Jun 03 2022 - 13:10:24 EST


When kernel.h is used in the headers it adds a lot into dependency hell,
especially when there are circular dependencies are involved.

Replace kernel.h inclusion with the list of what is really being used.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
---
include/linux/rbtree.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/rbtree.h b/include/linux/rbtree.h
index 235047d7a1b5..f7edca369eda 100644
--- a/include/linux/rbtree.h
+++ b/include/linux/rbtree.h
@@ -17,9 +17,9 @@
#ifndef _LINUX_RBTREE_H
#define _LINUX_RBTREE_H

+#include <linux/container_of.h>
#include <linux/rbtree_types.h>

-#include <linux/kernel.h>
#include <linux/stddef.h>
#include <linux/rcupdate.h>

--
2.35.1