Re: [PATCH v8 01/17] spi: add basic support for SPI offloading

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

 



Hello Andy,

On Tue, Feb 11, 2025 at 09:12:30PM +0200, Andy Shevchenko wrote:
> On Tue, Feb 11, 2025 at 07:45:30PM +0100, Uwe Kleine-König wrote:
> > I have no problem here. If the header becomes stale we will most
> > probably notice that eventually and remove it.
> 
> Lol. Look at the header hell we have now. 98% code in the drivers/ just show
> that the developers either don't care or do not understand C (in terms of
> what headers are for and why it's important to follow IWYU principle).

Yeah, there is a problem. The source is that we have a metric ton of
recursive includes (i.e. headers that include other headers that include
still more headers). Even if you care, its sometimes hard to know which
headers you actually need. One idea on my long-term list is to add a
machine-parsable info to header files about the list of symbols that the
given file is responsible for. With that in place we could create a
linter that tells you that this source file doesn't use any symbols from
<linux/of_irq.h> and it should #include <linux/of.h> directly instead to
make use of symbols defined there.

> > Maybe the unused namespace even makes it easier to spot that issue.
> 
> Do we have an existing tools for that?

There is https://lore.kernel.org/all/20250123110951.370759-2-u.kleine-koenig@xxxxxxxxxxxx/

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux