Re: [PATCH v2 02/15] media: intel/ipu6: add IPU auxiliary devices

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

 



On Wed, Oct 25, 2023 at 03:14:00PM +0800, Bingbu Cao wrote:
> On 10/24/23 8:58 PM, Andy Shevchenko wrote:
> > On Tue, Oct 24, 2023 at 07:29:11PM +0800, bingbu.cao@xxxxxxxxx wrote:

> auxiliary_bus.h is included in ipu6-bus.h,

So, you have to include it explicitly as IWYU, strictly speaking ipu6-bus.h
does NOT guarantee that inclusion, even if you fully control it.

> list.h, mutex.h dev_printk.h are
> included in device.h,

I ack for dev_printk.h, but for the rest see above.

> dma-mapping.h and scatterlist.h are included in pci.h.

See above.


> I am a little confused about the rule, do you mean we need include the
> generic headers we need even it is included in others header?

Yes. There are only few guarantees in the kernel, strictly speaking. And having
spaghetti headers in your code is a bad idea from long run maintenance
perspective.

...

> >> +#ifndef IPU6_BUS_H
> >> +#define IPU6_BUS_H
> >> +
> >> +#include <linux/auxiliary_bus.h>
> > 
> > ...Especially for headers which will affect the compilation time.
> > 
> >> +#include <linux/pci.h>
> > 
> > This is not used.
> 
> Do you mean it just need a 'struct pci_dev;' ?

Yes.

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux