From: Ian Campbell <ian.campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: wei.liu2@citrix.com, Chunyan Liu <cyliu@suse.com>,
xen-devel@lists.xen.org
Subject: Re: [PATCH] pci-attach: fix assertation
Date: Wed, 16 Sep 2015 14:44:02 +0100 [thread overview]
Message-ID: <1442411042.18856.65.camel@citrix.com> (raw)
In-Reply-To: <22009.28962.438024.593962@mariner.uk.xensource.com>
On Wed, 2015-09-16 at 14:39 +0100, Ian Jackson wrote:
> Ian Campbell writes ("Re: [PATCH] pci-attach: fix assertation"):
> > Ian, tools/libxl/libxl_internal.h says to initialised the transaction
> > to 0
> > rather than XBT_NULL explicitly -- I don't think there is a specific
> > reason
> > for that though?
>
> It says:
>
> /* Transaction functions, best used together.
> * The caller should initialise *t to 0 (XBT_NULL) before calling start.
>
> I think that amounts to a promise that XBT_NULL == 0. Therefore the
> caller may (from a correctness pov) use either.
Agreed, I just wanted to be sure there wasn't some magic reason to avoid
XBT_NULL (other than, as you say, needless verbiage).
> It is important that initialisation with 0 is supported because then
> FILLZERO is known to DTRT. (Note that, analogously, we are already
> assuming that FILLZERO generates null pointers.)
Right.
> I know that some people have strong views that writing NULL for null
> pointers, rather than 0, is better. I think it is needless verbiage.
> A similar argument applies to XBT_NULL. I think this is a bikeshed
> and am happy to let it be whatever colour it comes from the factory
> :-).
Ack.
next prev parent reply other threads:[~2015-09-16 13:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 6:16 [PATCH] pci-attach: fix assertation Chunyan Liu
2015-09-16 8:25 ` Ian Campbell
2015-09-16 13:39 ` Ian Jackson
2015-09-16 13:44 ` Ian Campbell [this message]
2015-09-16 14:08 ` Wei Liu
2015-09-17 12:00 ` Ian Campbell
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=1442411042.18856.65.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=cyliu@suse.com \
--cc=wei.liu2@citrix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).