From: Wei Liu Subject: Re: [PATCH v4 2/5] xl: improve return and exit codes of scheduling related functions Date: Tue, 27 Oct 2015 13:50:32 +0000 Message-ID: <20151027135032.GV18674@zion.uk.xensource.com> References: <1445950138-9908-1-git-send-email-write.harmandeep@gmail.com> <1445950138-9908-3-git-send-email-write.harmandeep@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zr4e5-0003aj-RH for xen-devel@lists.xenproject.org; Tue, 27 Oct 2015 13:50:37 +0000 Content-Disposition: inline In-Reply-To: <1445950138-9908-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 Cc: lars.kurth@citrix.com, wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, george.dunlap@citrix.com, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org On Tue, Oct 27, 2015 at 06:18:55PM +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. > I have one thing to complain. See below. > Signed-off-by: Harmandeep Kaur > Reviewed-by: Dario Faggioli > --- > v3->v4: No changes. > v2->v3: Reverted removal of 'rc' in sched_domain_output(). > > tools/libxl/xl_cmdimpl.c | 139 +++++++++++++++++++++++------------------------ > 1 file changed, 67 insertions(+), 72 deletions(-) > > 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 > @@ -5793,18 +5793,15 @@ int main_sharing(int argc, char **argv) > static int sched_domain_get(libxl_scheduler sched, int domid, > libxl_domain_sched_params *scinfo) > { > - int rc; > - > - rc = libxl_domain_sched_params_get(ctx, domid, scinfo); > - if (rc) { > + if (libxl_domain_sched_params_get(ctx, domid, scinfo)){ This, and other instances in both patch 2 and 3, violates coding style. You need to have a space before "{". Please go through patch 2 and patch 3 to fix all such violations. After that, you can add my ack to all your patches. I haven't carefully read through every line of change, but I think Dario's review is sufficient and thorough. Thanks Dario. Wei.