From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH v4 01/31] libxl: fix libxl__build_hvm error handling Date: Fri, 7 Aug 2015 12:03:17 +0100 Message-ID: <20150807110317.GF6005@zion.uk.xensource.com> References: <1438942688-7610-1-git-send-email-roger.pau@citrix.com> <1438942688-7610-2-git-send-email-roger.pau@citrix.com> <20150807104922.GD6005@zion.uk.xensource.com> <55C48E99.3050606@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZNfQp-0005w2-7L for xen-devel@lists.xenproject.org; Fri, 07 Aug 2015 11:03:23 +0000 Content-Disposition: inline In-Reply-To: <55C48E99.3050606@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau =?iso-8859-1?Q?Monn=E9?= Cc: xen-devel@lists.xenproject.org, Ian Campbell , Wei Liu , Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, Aug 07, 2015 at 12:55:21PM +0200, Roger Pau Monn=E9 wrote: > El 07/08/15 a les 12.49, Wei Liu ha escrit: > > On Fri, Aug 07, 2015 at 12:17:38PM +0200, Roger Pau Monne wrote: > >> With the current code in libxl__build_hvm it is possible for the funct= ion to > >> fail and still return 0. I care about this bit, which states clearly there is a bug that needs fixing. > > = > > It's hard to see where the bug is when this patch also does a bunch of > > refactoring. > = > It refactors the error paths only, mainly replacing: > = > if (libxl_call_foo(bar)) > > = > to > = > rc =3D libxl_call_foo(bar) > if (rc !=3D 0) > > = But this suggests there is no bug? = > So we can keep the error codes returned by auxiliary functions. > = > > It would be good if you can separate the bug fix from other name > > changing bits, so that we can apply that bug fix for 4.6 possibly queue > > it up for backporting. > = > There are no name changing bits AFAICT. > = Changing ret for rc is naming changing to me. It's a good thing to do to comply with coding style, but mixing this with bug fix makes it hard to backport the fix itself. Wei. > Roger.