All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keir Fraser <keir.xen@gmail.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: jisooy@gmail.com, xen-devel@lists.xen.org
Subject: Re: [PATCH] fix page_list_splice()
Date: Fri, 08 Jun 2012 08:51:08 +0100	[thread overview]
Message-ID: <CBF76D7C.35992%keir.xen@gmail.com> (raw)
In-Reply-To: <4FD10AC60200007800085AEE@nat28.tlf.novell.com>

On 07/06/2012 20:10, "Jan Beulich" <jbeulich@suse.com> wrote:

>> I mean to replace the comment with a second assertion, not to replace the
>> assertion your patch already adds. Does that make sense?
> 
> From the perspective of the operation here, we really just want to make
> sure that the new list head's prev points to where the old one's pointed;
> the fact that they're both supposed to be PAGE_LIST_NULL doesn't really
> matter. Hence simply asserting that the assignment is superfluous seems
> the best choice to me, with the comment explaining why. If you have
> suggestions for better wording of the comment, I'll gladly take those.
> 
> The second best choice imo would be to just have the superfluous
> assignment there (making it likely that later someone will come and
> ask why it's there when not really needed).

Well, I already did check in a version with two assertions, yesterday. :) I
like assertions, and asserting things about the good form of the data
structure being manipulated, even if that good form is not essential to this
specific operation, is not necessarily bad. Especially while we're already
asserting other things about those same list pointers.

It's not a major point here of course, it just seemed silly to to me to take
up a source line with a comment which could be stated just as clearly with
an assertion, and with added benefit (imo).

 -- Keir

> Jan
> 

      reply	other threads:[~2012-06-08  7:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-06  8:23 [PATCH] fix page_list_splice() Jan Beulich
2012-06-06  9:02 ` Keir Fraser
2012-06-06  9:26   ` Jan Beulich
2012-06-06 11:22     ` Keir Fraser
2012-06-07 19:10       ` Jan Beulich
2012-06-08  7:51         ` Keir Fraser [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=CBF76D7C.35992%keir.xen@gmail.com \
    --to=keir.xen@gmail.com \
    --cc=jbeulich@suse.com \
    --cc=jisooy@gmail.com \
    --cc=xen-devel@lists.xen.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 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.