From: "Robert P. J. Day" <rpjday@crashcourse.ca>
To: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: sg_next() for struct scatterlist is confusing
Date: Sat, 27 Oct 2007 12:35:32 -0400 (EDT) [thread overview]
Message-ID: <Pine.LNX.4.64.0710271234280.3409@localhost.localdomain> (raw)
In-Reply-To: <20071027183130.0215e355@siona>
On Sat, 27 Oct 2007, Haavard Skinnemoen wrote:
> On Sat, 27 Oct 2007 07:39:40 -0400 (EDT)
> "Robert P. J. Day" <rpjday@crashcourse.ca> wrote:
>
> > note how the comment says that the next entry will "usually" be
> > sg+1, "but" not if it's actually a pointer.
> >
> > however, as i read the code above, sg is *always* incremented before
> > that testing. is that correct? am i just misreading something? or
> > could the comment have been a bit clearer?
>
> If it increments sg and finds a "chain" entry, it will follow it to
> the next sg array instead of just returning it. Which makes sense
> because the chain entry itself isn't a valid entry in the sg list.
yes, i finally twigged on that after a few more minutes. it, of
course, makes sense, but it sure doesn't match the comment that's at
the top of that file.
rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA
http://crashcourse.ca
========================================================================
prev parent reply other threads:[~2007-10-27 16:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-27 11:39 Robert P. J. Day
2007-10-27 16:31 ` Haavard Skinnemoen
2007-10-27 16:35 ` Robert P. J. Day [this message]
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.0710271234280.3409@localhost.localdomain \
--to=rpjday@crashcourse.ca \
--cc=hskinnemoen@atmel.com \
--cc=linux-kernel@vger.kernel.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®