MemoryRegion::addr is private data of MemoryRegion, use
memory_region_get_address() to access it.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
 hw/pci-bridge/pci_expander_bridge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/pci-bridge/pci_expander_bridge.c 
b/hw/pci-bridge/pci_expander_bridge.c
index aa55749954a..0cb94fca9c0 100644
--- a/hw/pci-bridge/pci_expander_bridge.c
+++ b/hw/pci-bridge/pci_expander_bridge.c
@@ -161,7 +161,7 @@ static char *pxb_host_ofw_unit_address(const SysBusDevice 
*dev)
         MemoryRegion *mr = sysbus_mmio_get_region(main_host_sbd, 0);
 
         return g_strdup_printf(HWADDR_FMT_plx ",%x",
-                               mr->addr, position + 1);
+                               memory_region_get_address(mr), position + 1);
     }
     if (main_host_sbd->num_pio > 0) {
         return g_strdup_printf("i%04x,%x",
-- 
2.51.0


Reply via email to