mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Adrian Bunk <bunk@kernel.org>
Cc: Jens Axboe <jens.axboe@oracle.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Haavard Skinnemoen <hskinnemoen@atmel.no>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PATCH] Fix asm-avr32/dma-mapping.h breakage
Date: Wed, 24 Oct 2007 08:44:24 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0710240840390.1257@localhost.localdomain> (raw)
In-Reply-To: <20071024124123.GD30533@stusta.de>

On Wed, 24 Oct 2007, Adrian Bunk wrote:

> On Wed, Oct 24, 2007 at 02:21:20PM +0200, Jens Axboe wrote:
> > On Wed, Oct 24 2007, Robert P. J. Day wrote:

> > > i was just about to ask -- is this one of those cases where the
> > > asm versions of scatterlist.h should have a warning/error that
> > > they should not be included directly, and to include
> > > linux/scatterlist.h instead?

> > No, using asm/scatterlist.h is perfectly fine. The problem is code
> > using the sg helpers should include linux/scatterlist.h since that
> > is where those are defined.

> > If you just need the scatterlist structure definition, then
> > asm/scatterlist.h is the correct include.

> But there's also the general question whether it's good practice for
> not architecture specific code to include asm/ headers.

> For APIs available on all architectures linux/ header are the right
> thing to use, and what is in the asm/ header and what in the linux/
> header becomes an implementation detail that can be changed.

more to the point, what the above shows is that the headers aren't
well defined.  one would think that a header file whose name is
"scatterlist.h" should provide content related solely to that name.

if there's different content, such as the "sg helpers" mentioned
above, then those should require a different header file inclusion.
it makes no sense to suggest that one should include
<asm/scatterlist.h> if you need *only* that content, but to include
<linux/scatterlist.h> if you need stuff *in addition to* the
scatterlist content.  that's just begging for confusion.

rday
-- 
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

  reply	other threads:[~2007-10-24 12:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-24 11:22 Haavard Skinnemoen
2007-10-24 11:24 ` Jens Axboe
2007-10-24 11:29   ` Sam Ravnborg
2007-10-24 11:58     ` Jens Axboe
2007-10-24 12:15     ` Robert P. J. Day
2007-10-24 12:21       ` Jens Axboe
2007-10-24 12:41         ` Adrian Bunk
2007-10-24 12:44           ` Robert P. J. Day [this message]
2007-10-24 12:58             ` Jens Axboe
2007-10-24 12:45           ` Jens Axboe

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=Pine.LNX.4.64.0710240840390.1257@localhost.localdomain \
    --to=rpjday@crashcourse.ca \
    --cc=bunk@kernel.org \
    --cc=hskinnemoen@atmel.no \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sam@ravnborg.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

all inboxes | Powered by JetHome®