Re: [PATCH 0/7] staging:iio: Header cleanup

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

 



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

> On Fri, Jun 11, 2021 at 6:25 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> >
> > 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...
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux