From: Philippe Mathieu-Daudé Date: Tue, 23 May 2023 06:12:04 +0000 (+0200) Subject: hw/core/cpu: Simplify realize() using MACHINE_GET_CLASS() macro X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bec552e2cdb1950e2cd5f1853c396ea91ec80253;p=qemu.git hw/core/cpu: Simplify realize() using MACHINE_GET_CLASS() macro Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c index f4e51c8a1b..ced66c2b34 100644 --- a/hw/core/cpu-common.c +++ b/hw/core/cpu-common.c @@ -196,8 +196,7 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp) * no need to check the ignore_memory_transaction_failures board flag. */ if (object_dynamic_cast(machine, TYPE_MACHINE)) { - ObjectClass *oc = object_get_class(machine); - MachineClass *mc = MACHINE_CLASS(oc); + MachineClass *mc = MACHINE_GET_CLASS(machine); if (mc) { cpu->ignore_memory_transaction_failures =