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:
committed by
Peter Xu
parent
554671c1ec
commit
f016021ff5
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user