Re: [PATCH 00/17] Add memberof(), split some headers, and slightly simplify code

From: Andy Shevchenko
Date: Fri Nov 19 2021 - 10:49:41 EST


On Fri, Nov 19, 2021 at 04:43:04PM +0100, Alejandro Colomar (man-pages) wrote:
> On 11/19/21 16:38, Alejandro Colomar (man-pages) wrote:
> > On 11/19/21 16:34, Andy Shevchenko wrote:
> >> On Fri, Nov 19, 2021 at 04:06:27PM +0100, Alejandro Colomar (man-pages) wrote:
> >>> Yes, I would like to untangle the dependencies.
> >>>
> >>> The main reason I started doing this splitting
> >>> is because I wouldn't be able to include
> >>> <linux/stddef.h> in some headers,
> >>> because it pulled too much stuff that broke unrelated things.
> >>>
> >>> So that's why I started from there.
> >>>
> >>> I for example would like to get NULL in memberof()
> >>> without puling anything else,
> >>> so <linux/NULL.h> makes sense for that.
> >>
> >> I don't believe that the code that uses NULL won't include types.h.
> >
> > I'm not sure about the error I got (I didn't write it down),
> > but I got a compilation error.
> > That's why I split NULL.
>
> Now that I think about it twice,
> since I'm rewriting these changes from scratch,
> I think the error might have been
> not due to pulling too much stuff,
> but due to circular dependencies.
>
> Having more granularity
> helps precisely define the dependencies.
>
> I think the problem was in
> <linux/memberof.h> requiring NULL from <linux/stddef.h>
> <linux/stddef.h> requiring memberof() from <linux/memberof.h>
> or something like that.

There is no memberof.h in the kernel. Something is done wrongly on your series.

--
With Best Regards,
Andy Shevchenko