Re: [PATCH] missing includes from infiniband merge

From: Al Viro
Date: Sun Sep 24 2006 - 17:35:39 EST


On Sun, Sep 24, 2006 at 10:52:44PM +0200, Sam Ravnborg wrote:
> The only thing I like to see is minimal suprise. And minimal suprise in
> this case is to be considered as "works on almost all archs if not all".
> In practical terms it could be that users of asm/* had to include
> baz.h before bar.h.

Even though dependency on baz.h is due to implementation of one of the
helpers in bar.h on a few targets and makes no sense whatsoever for
everything else?

> Or we could stick to current mess where one has
> to have a shitload of crosscompiles and CPU power to check even trivial
> changes to a few include files.

We _are_ stuck with it.

> Partly this could be fixed by making header files in asm-$(ARCH)
> second class citizen - that always got included via their linux/
> counterpart.

Which only makes dependency graph fatter... What's the difference
between including asm/uaccess.h and linux/uaccess.h?

Basically, you pull tons of includes into linux/blah.h because it
happens to include asm/foo.h and _that_ depends on having linux/barf.h
for $WEIRD_TARGET. And guess what? You are back to the same cross-compiles,
since attempt to remove blah.h -> barf.h will break $WEIRD_TARGET, but
you won't notice that unless you cross-compile for it.

So all you get is a bunch of harder to explain includes between linux/*.h,
_and_ extra dependencies that make no sense whatsoever.
-
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/