Re: [PATCH 0/7] iio: light: clean out of_match_ptr and tidy headers

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

 



On Mon, Apr 20, 2020 at 6:49 PM Jonathan Cameron
<Jonathan.Cameron@xxxxxxxxxx> wrote:
> On Mon, 20 Apr 2020 06:22:09 +0000
> "Ardelean, Alexandru" <alexandru.Ardelean@xxxxxxxxxx> wrote:
> > On Mon, 2020-04-20 at 06:04 +0000, Ardelean, Alexandru wrote:
> > > On Sun, 2020-04-19 at 16:01 +0100, jic23@xxxxxxxxxx wrote:

> > One thing I noticed in the series.
> > No idea if it is needed or not; a build would tell:
> >    Is '#include <linux/mod_devicetable.h>' required for this change?
> > Most patches add it, but I don't feel it is needed; I could be wrong though.
>
> I addressed this in reply to patch 7.  It's mainly obtained via
> i2c.h and spi.h in these drivers.  They don't have any particular need
> to include it as they could deal with an opaque pointer.
>
> However, seems unlikely that'll get tidied up any time soon and
> debatable whether there is any point in doing so.

I would use the simple rule, we include header if we have direct user of it.

> > What I noticed is that all 'linux/of.h' , 'linux/of_device.h' &
> > 'linux/of_platform.h' include it.
>
> True, but we shouldn't include any of them unless we have reason to do
> so. They bring baggage we don't need for these drivers.


--
With Best Regards,
Andy Shevchenko



[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