xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	peter.maydell@linaro.org
Cc: xen-devel@lists.xensource.com, qemu-devel@nongnu.org
Subject: Re: [PULL 10/11] Add Error **errp for xen_pt_config_init()
Date: Sat, 23 Jan 2016 20:23:54 +0800	[thread overview]
Message-ID: <56A370DA.7030205@cn.fujitsu.com> (raw)
In-Reply-To: <56A210C4.9040407@redhat.com>



On 01/22/2016 07:21 PM, Paolo Bonzini wrote:
>
>
> On 21/01/2016 18:01, Stefano Stabellini wrote:
>> -                        XEN_PT_LOG(&s->dev, "Failed to initialize %d/%ld reg 0x%x in grp_type=0x%x (%d/%ld), rc=%d\n",
>> -                                   j, ARRAY_SIZE(xen_pt_emu_reg_grps[i].emu_regs),
>> -                                   regs->offset, xen_pt_emu_reg_grps[i].grp_type,
>> -                                   i, ARRAY_SIZE(xen_pt_emu_reg_grps), rc);
>> +                    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),
>
> Coverity noticed a preexisting problem here.  emu_regs is a pointer,
> thus ARRAY_SIZE doesn't return what you expect.
>
Hi stefano,

Seems ARRAY_SIZE(xen_pt_emu_reg_grps[i].emu_regs) is not important err 
message to regular users, and I guess it still can help developer to 
debug even without it. So, do you think it is ok to remove it? Or any 
better idea?

> Paolo
>


-- 
Yours Sincerely,

Cao jin

  reply	other threads:[~2016-01-23 12:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-21 17:01 [PULL 0/11] xen-20160121 Stefano Stabellini
2016-01-21 17:01 ` [PULL 01/11] MAINTAINERS: update Xen files Stefano Stabellini
2016-01-21 17:01 ` [PULL 02/11] xenfb.c: avoid expensive loops when prod <= out_cons Stefano Stabellini
2016-01-21 17:01 ` [PULL 03/11] xen-hvm: Clean up xen_hvm_init() error handling Stefano Stabellini
2016-01-21 17:01 ` [PULL 04/11] xen-hvm: Clean up xen_ram_alloc() " Stefano Stabellini
2016-01-21 17:01 ` [PULL 05/11] xen-pvdevice: convert to realize() Stefano Stabellini
2016-01-21 17:01 ` [PULL 06/11] Change xen_host_pci_sysfs_path() to return void Stefano Stabellini
2016-01-21 17:01 ` [PULL 07/11] Xen: use qemu_strtoul instead of strtol Stefano Stabellini
2016-01-21 17:01 ` [PULL 08/11] Add Error **errp for xen_host_pci_device_get() Stefano Stabellini
2016-01-21 17:01 ` [PULL 09/11] Add Error **errp for xen_pt_setup_vga() Stefano Stabellini
2016-01-21 17:01 ` [PULL 10/11] Add Error **errp for xen_pt_config_init() Stefano Stabellini
2016-01-22 11:21   ` Paolo Bonzini
2016-01-23 12:23     ` Cao jin [this message]
2016-01-25 10:53       ` Stefano Stabellini
2016-01-21 17:01 ` [PULL 11/11] Xen PCI passthru: convert to realize() Stefano Stabellini
2016-01-21 17:45 ` [PULL 0/11] xen-20160121 Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56A370DA.7030205@cn.fujitsu.com \
    --to=caoj.fnst@cn.fujitsu.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).