Message ID | 20231003183058.1639121-13-richard.henderson@linaro.org |
---|---|
State | New |
Headers | show |
Series | TCG code quality tracking | expand |
On 3/10/23 20:30, Richard Henderson wrote: > Signed-off-by: Richard Henderson <richard.henderson@linaro.org> > --- > include/exec/memory.h | 2 ++ > softmmu/physmem.c | 4 ++-- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/include/exec/memory.h b/include/exec/memory.h > index ef23d65afc..ebdecf64a6 100644 > --- a/include/exec/memory.h > +++ b/include/exec/memory.h > @@ -2874,6 +2874,8 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr, > hwaddr len, hwaddr addr1, hwaddr l, > MemoryRegion *mr); > void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr); > +void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, > + hwaddr *size, bool lock); > > /* Internal functions, part of the implementation of address_space_read_cached > * and address_space_write_cached. */ > diff --git a/softmmu/physmem.c b/softmmu/physmem.c > index 309653c722..69a853c27a 100644 > --- a/softmmu/physmem.c > +++ b/softmmu/physmem.c > @@ -2182,8 +2182,8 @@ void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr) > * > * Called within RCU critical section. > */ > -static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, > - hwaddr *size, bool lock) > +void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, > + hwaddr *size, bool lock) > { > RAMBlock *block = ram_block; > if (*size == 0) { Pre-existing, function named with '_length' suffix but takes a 'size' parameter. Preferably moving the docstring along with the public declaration: Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
diff --git a/include/exec/memory.h b/include/exec/memory.h index ef23d65afc..ebdecf64a6 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -2874,6 +2874,8 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr addr, hwaddr len, hwaddr addr1, hwaddr l, MemoryRegion *mr); void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr); +void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, + hwaddr *size, bool lock); /* Internal functions, part of the implementation of address_space_read_cached * and address_space_write_cached. */ diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 309653c722..69a853c27a 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -2182,8 +2182,8 @@ void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr) * * Called within RCU critical section. */ -static void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, - hwaddr *size, bool lock) +void *qemu_ram_ptr_length(RAMBlock *ram_block, ram_addr_t addr, + hwaddr *size, bool lock) { RAMBlock *block = ram_block; if (*size == 0) {
Signed-off-by: Richard Henderson <richard.henderson@linaro.org> --- include/exec/memory.h | 2 ++ softmmu/physmem.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)