public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
	rolandd@cisco.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] missing includes from infiniband merge
Date: Sat, 23 Sep 2006 21:54:35 +0100	[thread overview]
Message-ID: <20060923205434.GO29920@ftp.linux.org.uk> (raw)
In-Reply-To: <20060923203605.GN29920@ftp.linux.org.uk>

On Sat, Sep 23, 2006 at 09:36:05PM +0100, Al Viro wrote:
> On Sat, Sep 23, 2006 at 10:29:12PM +0200, Sam Ravnborg wrote:
> > On Sat, Sep 23, 2006 at 04:44:16PM +0100, Al Viro wrote:
> > > indirect chains of includes are arch-specific and can't
> > > be relied upon...  (hell, even attempt to build it for
> > > itanic would trigger vmalloc.h ones; err.h triggers
> > > on e.g. alpha).
> > > 
> > > Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> > > ---
> > >  drivers/infiniband/core/mad_priv.h           |    1 +
> > >  drivers/infiniband/hw/amso1100/c2_provider.c |    1 +
> > >  drivers/infiniband/hw/amso1100/c2_rnic.c     |    1 +
> > >  drivers/infiniband/hw/ipath/ipath_diag.c     |    1 +
> > >  4 files changed, 4 insertions(+), 0 deletions(-)
> > A better fix would be to avoid the arch dependency in the non-arch .h
> > files so that in most cases it just works??
> 
> What "it"?  Use of vmalloc() without including vmalloc.h since on i386
> it just happens to be pulled via the
> linux/pci.h -> linux/dmapool.h -> asm-i386/io.h -> linux/vmalloc.h
> chain?

BTW, to do what you suggest we would mean the following:

let H(arch,foo) = {bar | asm-arch/foo.h pulls asm-arch/bar.h via chain that
doesn't include linux/*}
let M(arch,foo) = {baz | asm-arch/bar.h includes linux/baz.h for some bar in
H(arch,foo)}
let L(foo) = union of M(arch,foo) by all arch.
make sure that for each arch and for each bar in L(foo) we have asm-arch/foo.h
pulling linux/bar.h

Have fun doing that and maintaining the results.  Note that addition of
include between asm-weird-crap/foo.h and asm-weird-crap/bar.h will require
changes all over the place in asm-*/* - not only for asm-*/foo.h.

It won't be pretty, it will be hell to even try to clean dependencies
_and_ it will break all the time due to ordering requirements.

  reply	other threads:[~2006-09-23 20:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-23 15:44 [PATCH] missing includes from infiniband merge Al Viro
2006-09-23 17:35 ` Roland Dreier
2006-09-23 20:29 ` Sam Ravnborg
2006-09-23 20:36   ` Al Viro
2006-09-23 20:54     ` Al Viro [this message]
2006-09-24  6:44     ` Sam Ravnborg
2006-09-24 19:19       ` Al Viro
2006-09-24 20:52         ` Sam Ravnborg
2006-09-24 21:35           ` Al Viro
2006-09-24 21:56             ` 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=20060923205434.GO29920@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rolandd@cisco.com \
    --cc=sam@ravnborg.org \
    --cc=torvalds@osdl.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