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/xarray.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/include/linux/xarray.h b/include/linux/xarray.h index 72feab5ea8d4..e9fedaa3498a 100644 --- a/include/linux/xarray.h +++ b/include/linux/xarray.h @@ -12,13 +12,18 @@ #include <linux/bitmap.h> #include <linux/bug.h> #include <linux/compiler.h> +#include <linux/err.h> #include <linux/gfp.h> #include <linux/kconfig.h> -#include <linux/kernel.h> +#include <linux/limits.h> +#include <linux/lockdep.h> +#include <linux/math.h> #include <linux/rcupdate.h> #include <linux/spinlock.h> #include <linux/types.h> +#include <asm/bitsperlong.h> + /* * The bottom two bits of the entry determine how the XArray interprets * the contents: -- 2.35.1