From: Philippe Mathieu-Daudé <[email protected]> Mark the AddressSpace structure const when it is only accessed read-only.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> Reviewed-by: Pierrick Bouvier <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- system/memory.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/system/memory.c b/system/memory.c index 739ba11da6f..ea2ce80cf2c 100644 --- a/system/memory.c +++ b/system/memory.c @@ -889,7 +889,8 @@ static void address_space_update_ioeventfds(AddressSpace *as) * range `cmr'. Only the part that has intersection of the specified * FlatRange will be sent. */ -static void flat_range_coalesced_io_notify(FlatRange *fr, AddressSpace *as, +static void flat_range_coalesced_io_notify(FlatRange *fr, + const AddressSpace *as, CoalescedMemoryRange *cmr, bool add) { AddrRange tmp; @@ -913,7 +914,7 @@ static void flat_range_coalesced_io_notify(FlatRange *fr, AddressSpace *as, } } -static void flat_range_coalesced_io_del(FlatRange *fr, AddressSpace *as) +static void flat_range_coalesced_io_del(FlatRange *fr, const AddressSpace *as) { CoalescedMemoryRange *cmr; @@ -922,7 +923,7 @@ static void flat_range_coalesced_io_del(FlatRange *fr, AddressSpace *as) } } -static void flat_range_coalesced_io_add(FlatRange *fr, AddressSpace *as) +static void flat_range_coalesced_io_add(FlatRange *fr, const AddressSpace *as) { MemoryRegion *mr = fr->mr; CoalescedMemoryRange *cmr; @@ -940,7 +941,8 @@ static void flat_range_coalesced_io_notify_listener_add_del(FlatRange *fr, MemoryRegionSection *mrs, MemoryListener *listener, - AddressSpace *as, bool add) + const AddressSpace *as, + bool add) { CoalescedMemoryRange *cmr; MemoryRegion *mr = fr->mr; -- 2.53.0
