linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: linux-iio <linux-iio@vger.kernel.org>,
	Nuno Sa <Nuno.Sa@analog.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	Jonathan Cameron <Jonathan.Cameron@huawei.com>
Subject: Re: [PATCH 0/7] staging:iio: Header cleanup
Date: Fri, 11 Jun 2021 19:14:03 +0100	[thread overview]
Message-ID: <20210611191403.14d676a9@jic23-huawei> (raw)
In-Reply-To: <CAHp75VfN93-B-UYCEMfxym-_XS_Edr+G07P6xO+83+gkMeC1LQ@mail.gmail.com>

On Fri, 11 Jun 2021 20:45:03 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Jun 11, 2021 at 6:25 PM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > 0-day recently started giving some reports from the include-what-you-use
> > tool (needs LLVM builds).
> >
> > I was curious so decided to give it a spin.  It produces a wealth of
> > information, but the suggestions require a high degree of interpretation
> > and some choices are down to personal taste.
> >
> > This set covers resulting changes that I think make sense for remaining
> > IIO drivers in staging (which I just noticed are all Analog devices ones :)  
> 
> In general it's a good idea, but the tool doesn't know the project specifics.
> I believe that half of what you have done is simply wrong. That is, we
> have a lot of drivers that include kernel.h which is in its turn a
> rabbit hole of all possible headers and (circular) dependencies. So,
> for this and the other series, please double check that removed
> headers are not removed due to kernel.h (I believe this is the case
> for almost all if not all entries of slab.h, for example).

The tool seems to go rather the other way and suggest including things
that are 'obviously' included via another header that we need.

The reason for kernel.h includes when being added is almost always ARRAY_SIZE
or container_of as you identified.

The drivers where I'm removing slab.h don't actually make any direct
allocate or free calls, they are all wrapped up in various IIO core function
(devm_iio_device_alloc etc.)

Jonathan


> 
> The other half seems correct. But due to the above I can't give any
> tag on these...
> 


  reply	other threads:[~2021-06-11 18:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 15:26 [PATCH 0/7] staging:iio: Header cleanup Jonathan Cameron
2021-06-11 15:26 ` [PATCH 1/7] staging:iio:adc: Cleanup includes Jonathan Cameron
2021-06-11 15:26 ` [PATCH 2/7] staging:iio:addac:adt7316: " Jonathan Cameron
2021-06-11 17:40   ` Andy Shevchenko
2021-06-11 15:26 ` [PATCH 3/7] staging:iio:cdc:ad7746: " Jonathan Cameron
2021-06-11 15:26 ` [PATCH 4/7] staging:iio:frequency: " Jonathan Cameron
2021-06-11 15:26 ` [PATCH 5/7] staging:iio:impedance-analyzer: " Jonathan Cameron
2021-06-11 15:26 ` [PATCH 6/7] staging:iio:meter:ade7854: " Jonathan Cameron
2021-06-11 15:26 ` [PATCH 7/7] staging:iio:resolver:ad2s1210: " Jonathan Cameron
2021-06-11 16:09   ` Jonathan Cameron
2021-06-11 17:45 ` [PATCH 0/7] staging:iio: Header cleanup Andy Shevchenko
2021-06-11 18:14   ` Jonathan Cameron [this message]
2021-06-11 18:36     ` Andy Shevchenko

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=20210611191403.14d676a9@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=Nuno.Sa@analog.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=lars@metafoo.de \
    --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;
as well as URLs for NNTP newsgroup(s).