mirror of
https://github.com/qemu/qemu.git
synced 2024-12-14 15:03:33 +08:00
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:
parent
d8ca9712f5
commit
bec552e2cd
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user