From: Ian Jackson <Ian.Jackson@eu.citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: xen-devel@lists.xenproject.org,
Roger Pau Monne <roger.pau@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH for-4.6] libxl: fix libxl__build_hvm error code return path
Date: Wed, 12 Aug 2015 16:49:01 +0100 [thread overview]
Message-ID: <21963.27373.433211.956730@mariner.uk.xensource.com> (raw)
In-Reply-To: <1439300892-6836-1-git-send-email-wei.liu2@citrix.com>
Wei Liu writes ("[PATCH for-4.6] libxl: fix libxl__build_hvm error code return path"):
> In 25652f23 ("tools/libxl: detect and avoid conflicts with RDM"), new
> code was added to use rc to store libxl function call return value,
> which complied to libxl coding style. That patch, however, didn't change
> other locations where return value was stored in ret. In the end
> libxl__build_hvm could return 0 when it failed.
>
> Explicitly set rc to ERROR_FAIL in all error paths to fix this.
...
> ret = libxl__vnuma_build_vmemrange_hvm(gc, domid, info, state, &args);
> if (ret) {
Why not change all the assignemnts to ret to assignments to rc, and
abolish ret ?
> LOGEV(ERROR, ret, "hvm build vmemranges failed");
> + rc = ERROR_FAIL;
Certainly this is wrong because it smashes all errors into ERROR_FAIL.
Ian.
next prev parent reply other threads:[~2015-08-12 15:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-11 13:48 [PATCH for-4.6] libxl: fix libxl__build_hvm error code return path Wei Liu
2015-08-11 13:55 ` Ian Campbell
2015-08-11 13:58 ` Wei Liu
2015-08-12 15:49 ` Ian Jackson [this message]
-- strict thread matches above, loose matches on Subject: below --
2015-08-07 16:08 Roger Pau Monne
2015-08-11 8:57 ` Wei Liu
2015-08-11 12:44 ` Ian Campbell
2015-08-11 12:48 ` Wei Liu
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=21963.27373.433211.956730@mariner.uk.xensource.com \
--to=ian.jackson@eu.citrix.com \
--cc=ian.campbell@citrix.com \
--cc=roger.pau@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xenproject.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.