From: Jonathan Cameron <jic23@kernel.org>
To: Jonathan Cameron <Jonathan.Cameron@Huawei.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>,
linux-iio <linux-iio@vger.kernel.org>
Subject: Re: [RFC PATCH 00/11] IIO: Bring core header includes up to date.
Date: Mon, 1 Nov 2021 20:42:12 +0000 [thread overview]
Message-ID: <20211101204212.0d1711b0@jic23-huawei> (raw)
In-Reply-To: <20211101093722.000011ba@Huawei.com>
...
> > > > > Long term plan here is to bring consistency to includes with benefits
> > > > > of resilience and hopefully reducing just how much code is actually pulled
> > > > > in whilst compiling.
> > > >
> > > > I forgot to mention that I've take a stricter view since doing this series
> > > > so it needs an update even in the tree above. This mostly affects
> > > > err.h, errno.h, stddef.h and types.h
> > >
> > > I don't think we need to include stddef.h to every C file, it should
> > > be guaranteed via something like types.h or so.
> >
> > There are places with stddef.h but not types.h required. I debated which
> > way to go on that and hence ended up with both for now, but it's obviously easy
> > to tweak.
Picking up on this particular example, I assumed it already would be included
in something that was pretty much always present (such as types.h) but it isn't...
So maybe I misinterpreted your comment and you are suggesting it would make
sense to include stddef.h in types.h?
Just looking at include/linux
we have about 49 instances of stddef.h being included, 91 of types.h but only
16 of both...
From the few I looked at I suspect main reason it's needed is for the
definition of NULL though lots of other headers are getting that indirectly.
Naturally this is one of the mega list in kernel.h but at least there is
no chance of a loop.
I'm open to suggestions on how to proceed.
Jonathan
> >
> > It may be that long term we look to have a standard kernel iwyu mapping file.
> > It's possible to build in a fair bit of flexibility but maybe we'll need to
> > tweak the tool to allow us even more.
> >
> > Jonathan
> >
> >
> > >
> > > > I'll update those in that tree sometime this week.
> > >
> >
>
prev parent reply other threads:[~2021-11-01 20:37 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-03 15:32 [RFC PATCH 00/11] IIO: Bring core header includes up to date Jonathan Cameron
2021-10-03 15:32 ` [RFC PATCH 01/11] iio: industrialio-core: Reorder header includes to be alphabetical Jonathan Cameron
2021-10-03 15:32 ` [RFC PATCH 02/11] iio: industrialio-core - Bring includes up to date Jonathan Cameron
2021-10-03 15:32 ` [RFC PATCH 03/11] iio: industrialio-buffer.c: " Jonathan Cameron
2021-10-03 15:32 ` [RFC PATCH 04/11] iio: industrialio-event.c: " Jonathan Cameron
2021-10-03 15:33 ` [RFC PATCH 05/11] iio: industrialio-trigger.c: " Jonathan Cameron
2021-10-03 15:33 ` [RFC PATCH 06/11] iio: inkern: " Jonathan Cameron
2021-10-03 15:33 ` [RFC PATCH 07/11] iio: configfs: " Jonathan Cameron
2021-10-03 15:33 ` [RFC PATCH 08/11] iio: misc core files: " Jonathan Cameron
2021-10-03 15:33 ` [RFC PATCH 09/11] iio: industrialio-triggered-buffer: " Jonathan Cameron
2021-10-03 15:33 ` [RFC PATCH 10/11] iio: industrialio-buffer-cb: " Jonathan Cameron
2021-10-03 15:33 ` [RFC PATCH 11/11] iio: kfifo-buf.c: " Jonathan Cameron
2021-10-31 17:08 ` [RFC PATCH 00/11] IIO: Bring core header " Jonathan Cameron
2021-10-31 17:12 ` Jonathan Cameron
2021-10-31 20:21 ` Andy Shevchenko
2021-10-31 20:56 ` Jonathan Cameron
2021-11-01 9:37 ` Jonathan Cameron
2021-11-01 20:42 ` Jonathan Cameron [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211101204212.0d1711b0@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@Huawei.com \
--cc=andy.shevchenko@gmail.com \
--cc=linux-iio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox