All of lore.kernel.org
 help / color / mirror / Atom feed
From: Haavard Skinnemoen <hskinnemoen@atmel.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: sg_next() for struct scatterlist is confusing
Date: Sat, 27 Oct 2007 18:31:30 +0200	[thread overview]
Message-ID: <20071027183130.0215e355@siona> (raw)
In-Reply-To: <Pine.LNX.4.64.0710270734210.24293@localhost.localdomain>

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.

Håvard

  reply	other threads:[~2007-10-27 16:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-27 11:39 sg_next() for struct scatterlist is confusing Robert P. J. Day
2007-10-27 16:31 ` Haavard Skinnemoen [this message]
2007-10-27 16:35   ` Robert P. J. Day

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=20071027183130.0215e355@siona \
    --to=hskinnemoen@atmel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rpjday@crashcourse.ca \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.