aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorManos Pitsidianakis <manos.pitsidianakis@linaro.org>2024-02-15 11:15:06 +0200
committerMichael Tokarev <mjt@tls.msk.ru>2024-02-20 20:34:21 +0300
commitaab4631a4aadf8fc4a5288357bded72aaae686b6 (patch)
tree403cb3ce2da8f89b36882bcc3c6f6d1f5b67516a /system
parenta722c0b125037dee7c68c688f681dcfc21522fc6 (diff)
downloadqemu-aab4631a4aadf8fc4a5288357bded72aaae686b6.zip
qemu-aab4631a4aadf8fc4a5288357bded72aaae686b6.tar.gz
qemu-aab4631a4aadf8fc4a5288357bded72aaae686b6.tar.bz2
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 <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>
Diffstat (limited to 'system')
-rw-r--r--system/physmem.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/system/physmem.c b/system/physmem.c
index 5e05465..e3ebc19 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;
}