[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f1a90f53-060e-2960-3926-e30b44a1be28@gmail.com>
Date: Fri, 19 Nov 2021 16:38:46 +0100
From: "Alejandro Colomar (man-pages)" <alx.manpages@...il.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: Arnd Bergmann <arnd@...db.de>, LKML <linux-kernel@...r.kernel.org>,
Ajit Khaparde <ajit.khaparde@...adcom.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Borislav Petkov <bp@...e.de>,
Corey Minyard <cminyard@...sta.com>, Chris Mason <clm@...com>,
Christian Brauner <christian.brauner@...ntu.com>,
David Sterba <dsterba@...e.com>,
Jani Nikula <jani.nikula@...ux.intel.com>,
Jason Wang <jasowang@...hat.com>,
Jitendra Bhivare <jitendra.bhivare@...adcom.com>,
John Hubbard <jhubbard@...dia.com>,
"John S . Gruber" <JohnSGruber@...il.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Josef Bacik <josef@...icpanda.com>,
Kees Cook <keescook@...omium.org>,
Ketan Mukadam <ketan.mukadam@...adcom.com>,
Len Brown <lenb@...nel.org>,
"Michael S. Tsirkin" <mst@...hat.com>,
Miguel Ojeda <ojeda@...nel.org>,
Mike Rapoport <rppt@...ux.ibm.com>,
Nick Desaulniers <ndesaulniers@...gle.com>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Rasmus Villemoes <linux@...musvillemoes.dk>,
Rodrigo Vivi <rodrigo.vivi@...el.com>,
Russell King <linux@...linux.org.uk>,
Somnath Kotur <somnath.kotur@...adcom.com>,
Sriharsha Basavapatna <sriharsha.basavapatna@...adcom.com>,
Subbu Seetharaman <subbu.seetharaman@...adcom.com>,
intel-gfx@...ts.freedesktop.org, linux-acpi@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-btrfs@...r.kernel.org,
linux-scsi@...r.kernel.org, netdev@...r.kernel.org,
virtualization@...ts.linux-foundation.org
Subject: Re: [PATCH 00/17] Add memberof(), split some headers, and slightly
simplify code
Hi Andy,
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.
If one could anwer my doubt,
I would be in better position to learn how to avoid them.
See below.
On 11/19/21 16:06, Alejandro Colomar (man-pages) wrote:
> BTW, I also have a longstanding doubt about
> how header files are organized in the kernel,
> and which headers can and cannot be included
> from which other files.
>
> For example I see that files in samples or scripts or tools,
> that redefine many things such as offsetof() or ARRAY_SIZE(),
> and I don't know if there's a good reason for that,
> or if I should simply remove all that stuff and
> include <linux/offsetof.h> everywhere I see offsetof() being used.
Thanks,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/
Powered by blists - more mailing lists