From aab4631a4aadf8fc4a5288357bded72aaae686b6 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Thu, 15 Feb 2024 11:15:06 +0200 Subject: [PATCH] system/physmem: remove redundant arg reassignment Arguments `ram_block` are reassigned to local declarations `block` without further use. Remove re-assignment to reduce noise. Signed-off-by: Manos Pitsidianakis Reviewed-by: Michael Tokarev Reviewed-by: David Hildenbrand Signed-off-by: Michael Tokarev --- system/physmem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/system/physmem.c b/system/physmem.c index 5e054650b8..e3ebc19eef 100644 --- a/system/physmem.c +++ b/system/physmem.c @@ -2154,10 +2154,8 @@ void qemu_ram_remap(ram_addr_t addr, ram_addr_t length) * * Called within RCU critical section. */ -void *qemu_map_ram_ptr(RAMBlock *ram_block, ram_addr_t addr) +void *qemu_map_ram_ptr(RAMBlock *block, ram_addr_t addr) { - RAMBlock *block = ram_block; - if (block == NULL) { block = qemu_get_ram_block(addr); addr -= block->offset; @@ -2182,10 +2180,9 @@ 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, +static void *qemu_ram_ptr_length(RAMBlock *block, ram_addr_t addr, hwaddr *size, bool lock) { - RAMBlock *block = ram_block; if (*size == 0) { return NULL; } -- 2.30.2