diff options
author | Cao jin | 2016-01-25 13:16:03 +0100 |
---|---|---|
committer | Stefano Stabellini | 2016-08-13 01:38:18 +0200 |
commit | c4f68f0b52f4d84658ee977eb7e44a80857e0b50 (patch) | |
tree | ec79dccb0cec46a0b7fb1195b7ad523d89a5d3dd /hw/xen/xen_pt_config_init.c | |
parent | Merge remote-tracking branch 'remotes/amit-migration/tags/migration-for-2.7-7... (diff) | |
download | qemu-c4f68f0b52f4d84658ee977eb7e44a80857e0b50.tar.gz qemu-c4f68f0b52f4d84658ee977eb7e44a80857e0b50.tar.xz qemu-c4f68f0b52f4d84658ee977eb7e44a80857e0b50.zip |
Xen: fix converity warning of xen_pt_config_init()
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 <caoj.fnst@cn.fujitsu.com>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Diffstat (limited to 'hw/xen/xen_pt_config_init.c')
-rw-r--r-- | hw/xen/xen_pt_config_init.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index 9869ffda01..6f18366f67 100644 --- a/hw/xen/xen_pt_config_init.c +++ b/hw/xen/xen_pt_config_init.c @@ -2049,9 +2049,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); |