Skip to content

Commit

Permalink
system/physmem: remove redundant arg reassignment
Browse files Browse the repository at this point in the history
Arguments `ram_block` are reassigned to local declarations `block`
without further use. Remove re-assignment to reduce noise.

Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
  • Loading branch information
epilys authored and Michael Tokarev committed Feb 20, 2024
1 parent a722c0b commit aab4631
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions system/physmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit aab4631

Please sign in to comment.