From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v5 2/5] xl: improve return and exit codes of scheduling related functions Date: Tue, 27 Oct 2015 18:11:29 +0100 Message-ID: <1445965889.2937.198.camel@citrix.com> References: <1445960324-11729-1-git-send-email-write.harmandeep@gmail.com> <1445960324-11729-3-git-send-email-write.harmandeep@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3918559962601556368==" Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zr7md-0002kz-Ij for xen-devel@lists.xenproject.org; Tue, 27 Oct 2015 17:11:39 +0000 In-Reply-To: <1445960324-11729-3-git-send-email-write.harmandeep@gmail.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: Harmandeep Kaur , xen-devel@lists.xenproject.org Cc: lars.kurth@citrix.com, wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, ian.jackson@eu.citrix.com, george.dunlap@citrix.com List-Id: xen-devel@lists.xenproject.org --===============3918559962601556368== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-yTj0ddmoEK6BdxJJIRlZ" --=-yTj0ddmoEK6BdxJJIRlZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2015-10-27 at 21:08 +0530, Harmandeep Kaur wrote: > Turning scheduling related functions exit codes towards using the > EXIT_[SUCCESS|FAILURE] constants, instead of instead of arbitrary > numbers > or libxl return codes. > - for main_*: arbitrary -> EXIT_SUCCESS|EXIT_FAILURE. > - for internal fucntion: arbitrary -> 0/1. >=20 > Signed-off-by: Harmandeep Kaur > Reviewed-by: Dario Faggioli > Acked-by: Wei Liu > --- > v4->v5: Corrected coding style. > v3->v4: No changes. > v2->v3: Reverted removal of 'rc' in sched_domain_output(). > Would you believe? When double checking specifically for coding style issues, I found one more. :-/ Harman, do you mind sending v6 with this fixed as well. Keep the tags (mine for sure, and I'm actually 99% sure of Wei's too, but, Wei, feel free to say otherwise). Sorry for noticing only now. > diff --git a/tools/libxl/xl_cmdimpl.c b/tools/libxl/xl_cmdimpl.c > index 646b281..b101aff 100644 > --- a/tools/libxl/xl_cmdimpl.c > +++ b/tools/libxl/xl_cmdimpl.c > @@ -6118,21 +6108,22 @@ int main_sched_credit(int argc, char **argv) > if (opt_r) > scparam.ratelimit_us =3D ratelimit; > =20 > - rc =3D sched_credit_params_set(poolid, &scparam); > - if (rc) > - return -rc; > + if (sched_credit_params_set(poolid, &scparam)) > + return EXIT_FAILURE; > } > } else if (!dom) { /* list all domain's credit scheduler info */ > - return -sched_domain_output(LIBXL_SCHEDULER_CREDIT, > + if (sched_domain_output(LIBXL_SCHEDULER_CREDIT, > sched_credit_domain_output, > sched_credit_pool_output, > - cpupool); > + cpupool)) > Here. Parameters on new lines need to be aligned with the function's opening '('. I.e.: if (sched_domain_output(LIBXL_SCHEDULER_CREDIT, sched_credit_domain_output, sched_credit_pool_output, cpupool)) Of course, this applies to the other two call sites of sched_domain_output() being refactored by the patch. Oh, BTW, it seems that something happened to threading in v5 (patch 4 was not in reply to the cover letter, at least this is how I see it). Previous versions were properly threaded, so I'm quite sure you know how to do it properly, and wanted only to draw your attention on it. :-) Thanks and Regards, Dario --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-yTj0ddmoEK6BdxJJIRlZ 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 v1 iEYEABECAAYFAlYvsEIACgkQk4XaBE3IOsTwewCgrS7sdAv4dfKC060OVHYVGRN7 Tp4AnjbSwx/5O7p6QSadGePjcJaTWZtN =RTbX -----END PGP SIGNATURE----- --=-yTj0ddmoEK6BdxJJIRlZ-- --===============3918559962601556368== 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 --===============3918559962601556368==--