system/ramblock: Constify various RAMBlock arguments

Mark the RAMBlock structure const when is only accessed read-only.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20260309183536.88976-2-philmd@linaro.org
Signed-off-by: Peter Xu <peterx@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé
2026-03-09 19:35:32 +01:00
committed by Peter Xu
parent 554671c1ec
commit f016021ff5
4 changed files with 32 additions and 32 deletions

View File

@@ -7,7 +7,7 @@ RAMBlock *qemu_ram_block_from_host(void *ptr, bool round_offset,
return NULL;
}
int qemu_ram_get_fd(RAMBlock *rb)
int qemu_ram_get_fd(const RAMBlock *rb)
{
return -1;
}

View File

@@ -3,17 +3,17 @@
#include "system/ramblock.h"
#include "system/memory.h"
void *qemu_ram_get_host_addr(RAMBlock *rb)
void *qemu_ram_get_host_addr(const RAMBlock *rb)
{
return 0;
}
ram_addr_t qemu_ram_get_offset(RAMBlock *rb)
ram_addr_t qemu_ram_get_offset(const RAMBlock *rb)
{
return 0;
}
ram_addr_t qemu_ram_get_used_length(RAMBlock *rb)
ram_addr_t qemu_ram_get_used_length(const RAMBlock *rb)
{
return 0;
}