diff mbox series

[1/4] hw/core/cpu: Simplify realize() using MACHINE_GET_CLASS() macro

Message ID 20230523061207.48818-2-philmd@linaro.org
State Superseded
Headers show
Series hw: Minor simplifications using proper QOM getter macros | expand

Commit Message

Philippe Mathieu-Daudé May 23, 2023, 6:12 a.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/core/cpu-common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Richard Henderson May 23, 2023, 6:22 p.m. UTC | #1
On 5/22/23 23:12, Philippe Mathieu-Daudé wrote:
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   hw/core/cpu-common.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index 5ccc3837b6..620312e9a5 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 =