system/memory: Constify various AddressSpace arguments (notify)

Mark the AddressSpace structure const when it is only accessed
read-only.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20260616020359.18627-4-philmd@oss.qualcomm.com>
This commit is contained in:
Philippe Mathieu-Daudé
2026-03-19 13:29:01 +01:00
committed by Philippe Mathieu-Daudé
parent 5825543f61
commit e8d053f4de
3 changed files with 5 additions and 5 deletions

View File

@@ -2703,7 +2703,7 @@ void address_space_destroy_free(AddressSpace *as);
*
* @as: an initialized #AddressSpace
*/
void address_space_remove_listeners(AddressSpace *as);
void address_space_remove_listeners(const AddressSpace *as);
/**
* address_space_rw: read from or write to an address space.

View File

@@ -3009,7 +3009,7 @@ void memory_global_dirty_log_stop(unsigned int flags)
}
static void listener_add_address_space(MemoryListener *listener,
AddressSpace *as)
const AddressSpace *as)
{
unsigned i;
FlatView *view;
@@ -3074,7 +3074,7 @@ static void listener_add_address_space(MemoryListener *listener,
}
static void listener_del_address_space(MemoryListener *listener,
AddressSpace *as)
const AddressSpace *as)
{
unsigned i;
FlatView *view;
@@ -3179,7 +3179,7 @@ void memory_listener_unregister(MemoryListener *listener)
listener->address_space = NULL;
}
void address_space_remove_listeners(AddressSpace *as)
void address_space_remove_listeners(const AddressSpace *as)
{
while (!QTAILQ_EMPTY(&as->listeners)) {
memory_listener_unregister(QTAILQ_FIRST(&as->listeners));

View File

@@ -3565,7 +3565,7 @@ address_space_unregister_map_client_do(AddressSpaceMapClient *client)
g_free(client);
}
static void address_space_notify_map_clients_locked(AddressSpace *as)
static void address_space_notify_map_clients_locked(const AddressSpace *as)
{
AddressSpaceMapClient *client;