Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
philmd authored and Michael Tokarev committed Jun 9, 2023
1 parent 5cfcc4b commit f2def09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions hw/core/cpu-common.c
Expand Up @@ -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 =
Expand Down

0 comments on commit f2def09

Please sign in to comment.