Re: + xarray-replace-kernelh-with-the-necessary-inclusions.patch added to mm-nonmm-unstable branch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 3 Jun 2022 19:48:57 +0100 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:

> On Fri, Jun 03, 2022 at 11:47:12AM -0700, Andrew Morton wrote:
> > On Fri, 3 Jun 2022 19:44:49 +0100 Matthew Wilcox <willy@xxxxxxxxxxxxx> wrote:
> > 
> > > On Fri, Jun 03, 2022 at 11:32:30AM -0700, Andrew Morton wrote:
> > > > ------------------------------------------------------
> > > > From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > > > Subject: include/linux/xarray.h: replace kernel.h with the necessary inclusions
> > > > Date: Fri, 3 Jun 2022 20:11:53 +0300
> > > > 
> > > > 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.
> > > > 
> > > > Link: https://lkml.kernel.org/r/20220603171153.48928-1-andriy.shevchenko@xxxxxxxxxxxxxxx
> > > > Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> > > > Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx>
> > > > Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> > > 
> > > NAK, breaks the test suite.
> > 
> > The test suite compiled OK for me?
> 
> I don't see a limits.h in tools/ ?

It works, but I'm not sure why.

cc -H says:

.... ./linux/xarray.h
..... ./generated/map-shift.h
..... ./linux/../../../../include/linux/xarray.h
...... ../../include/linux/bitmap.h
....... ../../include/linux/find.h
...... ./linux/bug.h
....... ../../include/asm/bug.h
...... ./linux/kconfig.h
....... ./linux/../../../../include/linux/kconfig.h
........ ./generated/autoconf.h
.... ./linux/local_lock.h
. ../../../lib/xarray.c
.. ../../include/linux/export.h
.. ../../include/linux/slab.h
.. ./linux/xarray.h

xarray.h has

#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/limits.h>
#include <linux/lockdep.h>
#include <linux/math.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
#include <linux/types.h>

Perhaps some magic happened with cpp's recognition of include guards?



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux