Re: dealing with excessive includes

From: Linus Torvalds
Date: Mon Oct 23 2006 - 13:06:55 EST




On Mon, 23 Oct 2006, Geert Uytterhoeven wrote:
>
> I agree _verifying_ this for all config and arch combinations is hard.
> But my point is that right now we're `solving' this at the user (of the
> include) level, which is an order of magnitude more work.
> If the includes were (sufficiently) self-contained, the driver writers would
> have to care less about config/arch dependencies.

But header files already basically are self-contained. They didn't always
use to be that way, but over the years, we've generally made them that way
in almost all cases.

The problem is generally not that they aren't self-contained, it's that
they bring in other things depending on architecture, and then some driver
depends on a header file including other header files, even when that
isn't always the case at all: exactly because which header file it
includes depends on config options (to a small degree) and on architecture
(to a much larger degree).

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/