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]> --- include/system/memory_cached.h | 2 +- system/physmem.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/system/memory_cached.h b/include/system/memory_cached.h index 6eb6179140b..760ecb38c19 100644 --- a/include/system/memory_cached.h +++ b/include/system/memory_cached.h @@ -117,7 +117,7 @@ void address_space_stb_cached(MemoryRegionCache *cache, * are relative to @addr. */ int64_t address_space_cache_init(MemoryRegionCache *cache, - AddressSpace *as, + const AddressSpace *as, hwaddr addr, hwaddr len, bool is_write); diff --git a/system/physmem.c b/system/physmem.c index e8a2c438c7d..b33aa14ab64 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -3829,7 +3829,7 @@ void cpu_physical_memory_unmap(void *buffer, hwaddr len, #include "memory_ldst.c.inc" int64_t address_space_cache_init(MemoryRegionCache *cache, - AddressSpace *as, + const AddressSpace *as, hwaddr addr, hwaddr len, bool is_write) -- 2.53.0
