[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PULL 10/11] Add Error **errp for xen_pt_config_init()
On Sat, 23 Jan 2016, Cao jin wrote: > 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? Yes, it is OK to remove it. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |