On Sun, Aug 7, 2011 at 1:41 PM, Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote: > I'm not sure if it's a good idea, but it might be possible to > reduce the amount of boilerplate headers in arch/*/include/asm if we > do the following: > 1) move include/asm-generic to include/generic/asm and replace > all references to asm-generic with generic/asm > 2) add include/generic to search path for headers, right after > arch/*/include > 3) kill every arch/foo/include/asm/bar.h that has only > #include <generic/asm/bar.h> > in it. I think we should do something like it, but not exactly that. There is value in having <asm-generic/xyz.h> for *helper* headers that are not complete in themselves. And for that case, we really do want to have the ability for header files to just do #include <asm-generic/bitops/le.h> or similar. And that should *not* be done with some kind of magic automatic search-path thing: that is very consciously about "I want that *particular* generic fragment". However, having it for the default case for those full header files is just annoying - as you say, those idiotic one-liner <asm/bar.h> files that just include the asm-generic one are annoying, and quite frankly, the current work-around for them (that "generic-y" thing) is not really any better. It's just another way to do the same broken thing. So I would suggest we just start a new directory, something like include/default, and add it as the last entry to the search path. Then we start populating it with <asm/xyz.h> files, and start removing the silly 'generic-y' workaround. Let's just use the search-path instead. The problem with 'generic-y' is that it literally is impossible to add a new asm header file without editing all architectures: you still have to add it to the 'generic-y' list for everybody. So generic-y doesn't really *help* anything or make it any easier. Linus -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html