From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wei Liu Subject: Re: [PATCH v3 03/23] xen-xsplice: Tool to manipulate xsplice payloads (v4) Date: Mon, 15 Feb 2016 12:59:02 +0000 Message-ID: <20160215125902.GK8818@citrix.com> References: <1455300361-13092-1-git-send-email-konrad.wilk@oracle.com> <1455300361-13092-4-git-send-email-konrad.wilk@oracle.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 1aVIk6-0003iW-La for xen-devel@lists.xenproject.org; Mon, 15 Feb 2016 12:59:06 +0000 Content-Disposition: inline In-Reply-To: <1455300361-13092-4-git-send-email-konrad.wilk@oracle.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: Konrad Rzeszutek Wilk Cc: Wei Liu , Ian Campbell , andrew.cooper3@citrix.com, Stefano Stabellini , Ian Jackson , xen-devel@lists.xen.org, mpohlack@amazon.de, ross.lagerwall@citrix.com, jinsong.liu@alibaba-inc.com, xen-devel@lists.xenproject.org, sasha.levin@citrix.com List-Id: xen-devel@lists.xenproject.org On Fri, Feb 12, 2016 at 01:05:41PM -0500, Konrad Rzeszutek Wilk wrote: [...] > diff --git a/tools/misc/xen-xsplice.c b/tools/misc/xen-xsplice.c > new file mode 100644 > index 0000000..13f762f > --- /dev/null > +++ b/tools/misc/xen-xsplice.c One gripe I have with this program is that many of its functions mix direct return and goto style error handling. > @@ -0,0 +1,470 @@ > +/* > + * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. > + */ > + [...] > +static const char *state2str(long state) > +{ > +#define STATE(x) [XSPLICE_STATE_##x] = #x > + static const char *const names[] = { > + STATE(LOADED), > + STATE(CHECKED), > + STATE(APPLIED), > + }; > +#undef STATE > + if (state >= ARRAY_SIZE(names)) > + return "unknown"; > + > + if (state < 0) > + return "-EXX"; > + This doesn't look very useful. Wei.