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> --- lib/rhashtable.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/rhashtable.c b/lib/rhashtable.c index a422c7dd9126..01502cf77564 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -12,9 +12,13 @@ */ #include <linux/atomic.h> +#include <linux/bit_spinlock.h> #include <linux/container_of.h> -#include <linux/kernel.h> +#include <linux/err.h> +#include <linux/export.h> #include <linux/init.h> +#include <linux/jhash.h> +#include <linux/lockdep.h> #include <linux/log2.h> #include <linux/sched.h> #include <linux/rculist.h> -- 2.33.0