From bacb4eb87608b398b5a261a5a9224758350add1d Mon Sep 17 00:00:00 2001 From: Bernhard Beschow Date: Mon, 3 Oct 2022 22:31:33 +0200 Subject: [PATCH] hw/ppc/e500: Reduce usage of sysbus API MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit PlatformBusDevice has an mmio attribute which gets aliased to SysBusDevice::mmio[0]. So PlatformbusDevice::mmio can be used directly, avoiding the sysbus API. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20221003203142.24355-5-shentey@gmail.com> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/e500.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c index 32495d0123..496c61b612 100644 --- a/hw/ppc/e500.c +++ b/hw/ppc/e500.c @@ -1023,7 +1023,7 @@ void ppce500_init(MachineState *machine) memory_region_add_subregion(address_space_mem, pmc->platform_bus_base, - sysbus_mmio_get_region(s, 0)); + &pms->pbus_dev->mmio); } /* -- 2.11.0