public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] possible killing of boilerplate headers by asm-generic reorg
@ 2011-08-07 20:41 Al Viro
  2011-08-07 21:00 ` Linus Torvalds
  0 siblings, 1 reply; 10+ messages in thread
From: Al Viro @ 2011-08-07 20:41 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kbuild, Arnd Bergmann

	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.

	We still can do override of default headers (simply by putting whatever
we want in arch/*/include/asm) and we can explicitly include the default from
arch/*/include/asm (by using explicit generic/asm in the #include).

	The tricky part is handling of exported headers; we could detect the
absense of asm/foo.h we'd like to export and have include/generic/asm/foo.h
copied in its place, but that's not pretty.  We also have a risk of userland
code doing explicit #include <asm-generic/foo.h>, but that's probably not
a legitimate thing to do anyway *and* we could export them as asm-generic,
rewriting includes in headers from generic/asm to asm-generic as we export
them.

	I'm honestly not sure if it's worth doing; comments?

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-08-11 20:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-07 20:41 [RFC] possible killing of boilerplate headers by asm-generic reorg Al Viro
2011-08-07 21:00 ` Linus Torvalds
2011-08-10  9:52   ` Michal Marek
2011-08-10 12:20     ` Arnd Bergmann
2011-08-10 15:34     ` Linus Torvalds
2011-08-11 13:16       ` Arnd Bergmann
2011-08-11 13:25         ` Al Viro
2011-08-11 14:20           ` David Howells
2011-08-11 20:44             ` Sam Ravnborg
2011-08-11 14:25         ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox