[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/8] mac_{old, new}world: Use local variable instead of qdev_get_m
From: |
Mark Cave-Ayland |
Subject: |
[PULL 2/8] mac_{old, new}world: Use local variable instead of qdev_get_machine() |
Date: |
Mon, 6 Feb 2023 22:07:16 +0000 |
From: BALATON Zoltan <balaton@eik.bme.hu>
We already have machine in a local variable so no need to use
qdev_get_machine(), also remove now unneeded line break.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-Id:
<719299533b89aa4516966065eae05c75744f50d3.1672868854.git.balaton@eik.bme.hu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
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.2
- [PULL 0/8] qemu-macppc queue 20230206, Mark Cave-Ayland, 2023/02/06
- [PULL 1/8] input/adb: Only include header where needed, Mark Cave-Ayland, 2023/02/06
- [PULL 2/8] mac_{old, new}world: Use local variable instead of qdev_get_machine(),
Mark Cave-Ayland <=
- [PULL 3/8] hw/misc/macio: Avoid some QOM casts, Mark Cave-Ayland, 2023/02/06
- [PULL 4/8] hw/misc/macio: Rename sysbus_dev to sbd for consistency and brevity, Mark Cave-Ayland, 2023/02/06
- [PULL 5/8] hw/misc/macio: Remove some single use local variables, Mark Cave-Ayland, 2023/02/06
- [PULL 6/8] hw/misc/macio: Return bool from functions taking errp, Mark Cave-Ayland, 2023/02/06
- [PULL 7/8] mac_nvram: Add block backend to persist NVRAM contents, Mark Cave-Ayland, 2023/02/06
- [PULL 8/8] mac_oldworld: Allow specifying nvram backing store, Mark Cave-Ayland, 2023/02/06
- Re: [PULL 0/8] qemu-macppc queue 20230206, Peter Maydell, 2023/02/07