aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2020-06-10 07:32:31 +0200
committerMarkus Armbruster <armbru@redhat.com>2020-06-15 22:05:28 +0200
commit287f43196d1008b1f85d7a33593789381dde2d4b (patch)
treeaef37704f7aa8e7625d97e02e81d26b980744f5b
parent8352a5b8ccdaeb3fc1b00550399abc375ae62d8b (diff)
downloadqemu-287f43196d1008b1f85d7a33593789381dde2d4b.zip
qemu-287f43196d1008b1f85d7a33593789381dde2d4b.tar.gz
qemu-287f43196d1008b1f85d7a33593789381dde2d4b.tar.bz2
hw/arm/armsse: Pass correct child size to sysbus_init_child_obj()
armsse_init() initializes s->armv7m[i] for all i. It passes the size of the entire array instead of the array element to sysbus_init_child_obj(). Harmless, but fix it anyway. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200610053247.1583243-43-armbru@redhat.com>
-rw-r--r--hw/arm/armsse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hw/arm/armsse.c b/hw/arm/armsse.c
index c903e72..f042145 100644
--- a/hw/arm/armsse.c
+++ b/hw/arm/armsse.c
@@ -257,7 +257,8 @@ static void armsse_init(Object *obj)
name = g_strdup_printf("armv7m%d", i);
sysbus_init_child_obj(OBJECT(&s->cluster[i]), name,
- &s->armv7m[i], sizeof(s->armv7m), TYPE_ARMV7M);
+ &s->armv7m[i], sizeof(s->armv7m[i]),
+ TYPE_ARMV7M);
qdev_prop_set_string(DEVICE(&s->armv7m[i]), "cpu-type",
ARM_CPU_TYPE_NAME("cortex-m33"));
g_free(name);