From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40361) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXuSa-0007td-Js for qemu-devel@nongnu.org; Thu, 11 Aug 2016 14:12:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXuSY-00044p-9t for qemu-devel@nongnu.org; Thu, 11 Aug 2016 14:12:03 -0400 Received: from mail-ua0-x230.google.com ([2607:f8b0:400c:c08::230]:34513) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXuSY-00044V-5T for qemu-devel@nongnu.org; Thu, 11 Aug 2016 14:12:02 -0400 Received: by mail-ua0-x230.google.com with SMTP id k90so5849633uak.1 for ; Thu, 11 Aug 2016 11:12:01 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1453724163-26353-1-git-send-email-caoj.fnst@cn.fujitsu.com> References: <1453724163-26353-1-git-send-email-caoj.fnst@cn.fujitsu.com> From: Peter Maydell Date: Thu, 11 Aug 2016 19:11:40 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH] Xen: fix converity warning of xen_pt_config_init() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers Cc: Stefano Stabellini , Cao jin Hi Stefano -- just a ping on this patch from January -- I have a feeling it maybe got lost in your change of email address? (I noticed looking through coverity reports that this one was unfixed and found Cao Jin's patch in the list archive.) thanks -- PMM On 25 January 2016 at 12:16, Cao jin wrote: > emu_regs is a pointer, ARRAY_SIZE doesn't return what we expect. > Since the remaining message is enough for debugging, so just remove it. > Also tweaked the message a little. > > Signed-off-by: Cao jin > --- > hw/xen/xen_pt_config_init.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c > index 81c6721..e505438 100644 > --- a/hw/xen/xen_pt_config_init.c > +++ b/hw/xen/xen_pt_config_init.c > @@ -2047,9 +2047,8 @@ void xen_pt_config_init(XenPCIPassthroughState *s, Error **errp) > for (j = 0; regs->size != 0; j++, regs++) { > xen_pt_config_reg_init(s, reg_grp_entry, regs, &err); > if (err) { > - error_append_hint(&err, "Failed to initialize %d/%zu" > - " reg 0x%x in grp_type = 0x%x (%d/%zu)", > - j, ARRAY_SIZE(xen_pt_emu_reg_grps[i].emu_regs), > + error_append_hint(&err, "Failed to init register %d" > + " offsets 0x%x in grp_type = 0x%x (%d/%zu)", j, > regs->offset, xen_pt_emu_reg_grps[i].grp_type, > i, ARRAY_SIZE(xen_pt_emu_reg_grps)); > error_propagate(errp, err); > -- > 2.1.0