qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PULL 08/16] hw/core/cpu: Simplify realize() using MACHINE_GET_CLASS() m


From: Michael Tokarev
Subject: [PULL 08/16] hw/core/cpu: Simplify realize() using MACHINE_GET_CLASS() macro
Date: Sat, 10 Jun 2023 09:57:46 +0300

From: Philippe Mathieu-Daudé <philmd@linaro.org>

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>
---
 hw/core/cpu-common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]