qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] system/physmem: remove redundant arg reassignment
@ 2024-02-15  9:15 Manos Pitsidianakis
  2024-02-15  9:37 ` David Hildenbrand
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Manos Pitsidianakis @ 2024-02-15  9:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-trivial, Michael Tokarev, Philippe Mathieu-Daudé,
	Alex Bennée, Paolo Bonzini, Peter Xu, David Hildenbrand

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>
---
 system/physmem.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/system/physmem.c b/system/physmem.c
index 5e66d9ae36..d4c3bfac65 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;
     }

base-commit: 5767815218efd3cbfd409505ed824d5f356044ae
-- 
γαῖα πυρί μιχθήτω



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-26  8:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15  9:15 [PATCH] system/physmem: remove redundant arg reassignment Manos Pitsidianakis
2024-02-15  9:37 ` David Hildenbrand
2024-02-15  9:38 ` Michael Tokarev
2024-02-15 11:09 ` Philippe Mathieu-Daudé
2024-02-26  8:54   ` Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).