summaryrefslogtreecommitdiffstats
path: root/hw/riscv/riscv_hart.c
diff options
context:
space:
mode:
authorMarkus Armbruster2020-06-10 07:32:24 +0200
committerMarkus Armbruster2020-06-15 22:05:28 +0200
commit19dc7e977c145cf3683dc5d18d54ef3629e34619 (patch)
treeb4bfa72fbbc0d0cc6f1429da946459394b93d5c1 /hw/riscv/riscv_hart.c
parentauxbus: Eliminate aux_create_slave() (diff)
downloadqemu-19dc7e977c145cf3683dc5d18d54ef3629e34619.tar.gz
qemu-19dc7e977c145cf3683dc5d18d54ef3629e34619.tar.xz
qemu-19dc7e977c145cf3683dc5d18d54ef3629e34619.zip
qom: Tidy up a few object_initialize_child() calls
The callers of object_initialize_child() commonly pass either &child, sizeof(child), or pchild, sizeof(*pchild). Tidy up the few that don't, mostly to keep the next commit simpler. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20200610053247.1583243-36-armbru@redhat.com>
Diffstat (limited to 'hw/riscv/riscv_hart.c')
-rw-r--r--hw/riscv/riscv_hart.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/riscv/riscv_hart.c b/hw/riscv/riscv_hart.c
index 276a9baca0..61e88e2e37 100644
--- a/hw/riscv/riscv_hart.c
+++ b/hw/riscv/riscv_hart.c
@@ -46,7 +46,7 @@ static void riscv_hart_realize(RISCVHartArrayState *s, int idx,
Error *err = NULL;
object_initialize_child(OBJECT(s), "harts[*]", &s->harts[idx],
- sizeof(RISCVCPU), cpu_type,
+ sizeof(s->harts[idx]), cpu_type,
&error_abort, NULL);
s->harts[idx].env.mhartid = s->hartid_base + idx;
qemu_register_reset(riscv_harts_cpu_reset, &s->harts[idx]);