[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v7 2/7] mac_{old,new}world: Use local variable instead of qdev_ge
From: |
BALATON Zoltan |
Subject: |
[PATCH v7 2/7] mac_{old,new}world: Use local variable instead of qdev_get_machine() |
Date: |
Wed, 4 Jan 2023 22:59:37 +0100 (CET) |
We already have machine in a local variable so no need to use
qdev_get_machine(), also remove now unneded line break.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
hw/ppc/mac_newworld.c | 3 +--
hw/ppc/mac_oldworld.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/hw/ppc/mac_newworld.c b/hw/ppc/mac_newworld.c
index 601ea518f8..460c14b5e3 100644
--- a/hw/ppc/mac_newworld.c
+++ b/hw/ppc/mac_newworld.c
@@ -466,8 +466,7 @@ static void ppc_core99_init(MachineState *machine)
fw_cfg = FW_CFG(dev);
qdev_prop_set_uint32(dev, "data_width", 1);
qdev_prop_set_bit(dev, "dma_enabled", false);
- object_property_add_child(OBJECT(qdev_get_machine()), TYPE_FW_CFG,
- OBJECT(fw_cfg));
+ object_property_add_child(OBJECT(machine), TYPE_FW_CFG, OBJECT(fw_cfg));
s = SYS_BUS_DEVICE(dev);
sysbus_realize_and_unref(s, &error_fatal);
sysbus_mmio_map(s, 0, CFG_ADDR);
diff --git a/hw/ppc/mac_oldworld.c b/hw/ppc/mac_oldworld.c
index 558c639202..5a7b25a4a8 100644
--- a/hw/ppc/mac_oldworld.c
+++ b/hw/ppc/mac_oldworld.c
@@ -303,8 +303,7 @@ static void ppc_heathrow_init(MachineState *machine)
fw_cfg = FW_CFG(dev);
qdev_prop_set_uint32(dev, "data_width", 1);
qdev_prop_set_bit(dev, "dma_enabled", false);
- object_property_add_child(OBJECT(qdev_get_machine()), TYPE_FW_CFG,
- OBJECT(fw_cfg));
+ object_property_add_child(OBJECT(machine), TYPE_FW_CFG, OBJECT(fw_cfg));
s = SYS_BUS_DEVICE(dev);
sysbus_realize_and_unref(s, &error_fatal);
sysbus_mmio_map(s, 0, CFG_ADDR);
--
2.30.6
- Re: [PATCH v7 4/7] mac_newworld: Add machine types for different mac99 configs, (continued)
- Re: [PATCH v7 4/7] mac_newworld: Add machine types for different mac99 configs, Mark Cave-Ayland, 2023/01/10
- Re: [PATCH v7 4/7] mac_newworld: Add machine types for different mac99 configs, BALATON Zoltan, 2023/01/10
- Re: [PATCH v7 4/7] mac_newworld: Add machine types for different mac99 configs, Mark Cave-Ayland, 2023/01/22
- Re: [PATCH v7 4/7] mac_newworld: Add machine types for different mac99 configs, BALATON Zoltan, 2023/01/22
- Re: [PATCH v7 4/7] mac_newworld: Add machine types for different mac99 configs, Josh Juran, 2023/01/22
- Re: [PATCH v7 4/7] mac_newworld: Add machine types for different mac99 configs, Mark Cave-Ayland, 2023/01/23
- Re: [PATCH v7 4/7] mac_newworld: Add machine types for different mac99 configs, BALATON Zoltan, 2023/01/23
[PATCH v7 7/7] mac_newworld: Document deprecation, BALATON Zoltan, 2023/01/04
[PATCH v7 2/7] mac_{old,new}world: Use local variable instead of qdev_get_machine(),
BALATON Zoltan <=
[PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg, BALATON Zoltan, 2023/01/04
- Re: [PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg, Mark Cave-Ayland, 2023/01/10
- Re: [PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg, BALATON Zoltan, 2023/01/10
- Re: [PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg, Mark Cave-Ayland, 2023/01/22
- Re: [PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg, BALATON Zoltan, 2023/01/22
- Re: [PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg, Mark Cave-Ayland, 2023/01/23
- Re: [PATCH v7 3/7] mac_{old,new}world: Pass MacOS VGA NDRV in card ROM instead of fw_cfg, BALATON Zoltan, 2023/01/23