hw/core/cpu: Simplify realize() using MACHINE_GET_CLASS() macro

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Philippe Mathieu-Daudé 2023-05-23 08:12:04 +02:00 committed by Michael Tokarev
parent d8ca9712f5
commit bec552e2cd

View File

@ -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 =