public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kbuild@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>
Subject: [RFC] possible killing of boilerplate headers by asm-generic reorg
Date: Sun, 7 Aug 2011 21:41:18 +0100	[thread overview]
Message-ID: <20110807204118.GA2203@ZenIV.linux.org.uk> (raw)

	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?

             reply	other threads:[~2011-08-07 20:41 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-07 20:41 Al Viro [this message]
2011-08-07 21:00 ` [RFC] possible killing of boilerplate headers by asm-generic reorg 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110807204118.GA2203@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=arnd@arndb.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox