From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH 5/9] libxl: introduce libxl_cpupool_cpu{add, remove}_cpumap() Date: Wed, 11 Mar 2015 16:50:47 +0000 Message-ID: <1426092644.21405.16.camel@citrix.com> References: <20150306170758.7269.53821.stgit@Solace.station> <20150306172132.7269.83077.stgit@Solace.station> <20150309103935.GH18491@zion.uk.xensource.com> <1426092120.21353.323.camel@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============8839313618248959298==" Return-path: In-Reply-To: <1426092120.21353.323.camel@citrix.com> Content-Language: en-US List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "JGross@suse.com" , Ian Jackson , Stefano Stabellini , Wei Liu , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org --===============8839313618248959298== Content-Language: en-US Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-DXePJ0l+MQmKj7lgtrJH" --=-DXePJ0l+MQmKj7lgtrJH Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2015-03-11 at 16:42 +0000, Ian Campbell wrote: > On Mon, 2015-03-09 at 10:39 +0000, Wei Liu wrote: > > rc =3D xc_cpupool_addcpu(ctx->xch, poolid, cpu); > > > if (rc) { > > > - LIBXL__LOG_ERRNOVAL(ctx, LIBXL__LOG_ERROR, rc, > > > - "Error moving cpu to cpupool"); > > > + LOGE(ERROR, "Error moving cpu %d to cpupool", cpu); > > > + GC_FREE; > > > return ERROR_FAIL; > > > } > > > + GC_FREE; > >=20 > > Please use "goto" idiom. Same applies to libxl_cpupool_cpuremove. >=20 > TBH I think using LIBXL__LOG_ERRNOVAL in functions where the GC is > otherwise unneeded in the entire call-chain, like here, is a reasonable > exception to the usual rule. >=20 And I distinctly remember someone of you tools people saying, about another patch, that "using the new macro is well worth adding a GC_INIT/FREE" :-D Of course, I'm fine with leaving this alone... just let me know what you prefer. :-) Regards, Dario --=-DXePJ0l+MQmKj7lgtrJH Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEABECAAYFAlUAcmUACgkQk4XaBE3IOsR33wCeNCNFKctlXVlnYBqxeWrUIn67 8JMAnAmYysgCzDtn/K3ik0MRnXZqjBlQ =Ppzg -----END PGP SIGNATURE----- --=-DXePJ0l+MQmKj7lgtrJH-- --===============8839313618248959298== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============8839313618248959298==--