Message ID | 20220603171153.48928-1-andriy.shevchenko@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v1,1/1] xarray: Replace kernel.h with the necessary inclusions | expand |
On Fri, Jun 03, 2022 at 08:11:53PM +0300, Andy Shevchenko wrote: > 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. Thanks. Can you fix the test suite too? (cd tools/testing/radix-tree; make)
On Fri, Jun 03, 2022 at 06:17:22PM +0100, Matthew Wilcox wrote: > On Fri, Jun 03, 2022 at 08:11:53PM +0300, Andy Shevchenko wrote: > > 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. > > Thanks. Can you fix the test suite too? > > (cd tools/testing/radix-tree; make) Works for me. Anything special I should try?
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:
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@linux.intel.com> --- include/linux/xarray.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)