[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 04/20] exec: Rename ram_ptr variable
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v3 04/20] exec: Rename ram_ptr variable |
Date: |
Thu, 20 Feb 2020 14:05:32 +0100 |
As we are going to use a different 'ptr' variable, rename the 'ram
pointer' variable.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
exec.c | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/exec.c b/exec.c
index 02b4e6ea41..06e386dc72 100644
--- a/exec.c
+++ b/exec.c
@@ -3151,7 +3151,7 @@ static MemTxResult flatview_write_continue(FlatView *fv,
hwaddr addr,
hwaddr len, hwaddr addr1,
hwaddr l, MemoryRegion *mr)
{
- uint8_t *ptr;
+ uint8_t *ram_ptr;
uint64_t val;
MemTxResult result = MEMTX_OK;
bool release_lock = false;
@@ -3167,8 +3167,8 @@ static MemTxResult flatview_write_continue(FlatView *fv,
hwaddr addr,
size_memop(l), attrs);
} else {
/* RAM case */
- ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l, false);
- memcpy(ptr, buf, l);
+ ram_ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l, false);
+ memcpy(ram_ptr, buf, l);
invalidate_and_set_dirty(mr, addr1, l);
}
@@ -3215,7 +3215,7 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr
addr,
hwaddr len, hwaddr addr1, hwaddr l,
MemoryRegion *mr)
{
- uint8_t *ptr;
+ uint8_t *ram_ptr;
uint64_t val;
MemTxResult result = MEMTX_OK;
bool release_lock = false;
@@ -3230,8 +3230,8 @@ MemTxResult flatview_read_continue(FlatView *fv, hwaddr
addr,
stn_he_p(buf, l, val);
} else {
/* RAM case */
- ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l, false);
- memcpy(buf, ptr, l);
+ ram_ptr = qemu_ram_ptr_length(mr->ram_block, addr1, &l, false);
+ memcpy(buf, ram_ptr, l);
}
if (release_lock) {
@@ -3329,7 +3329,7 @@ static inline MemTxResult
address_space_write_rom_internal(AddressSpace *as,
enum write_rom_type
type)
{
hwaddr l;
- uint8_t *ptr;
+ uint8_t *ram_ptr;
hwaddr addr1;
MemoryRegion *mr;
@@ -3343,14 +3343,14 @@ static inline MemTxResult
address_space_write_rom_internal(AddressSpace *as,
l = memory_access_size(mr, l, addr1);
} else {
/* ROM/RAM case */
- ptr = qemu_map_ram_ptr(mr->ram_block, addr1);
+ ram_ptr = qemu_map_ram_ptr(mr->ram_block, addr1);
switch (type) {
case WRITE_DATA:
- memcpy(ptr, buf, l);
+ memcpy(ram_ptr, buf, l);
invalidate_and_set_dirty(mr, addr1, l);
break;
case FLUSH_CACHE:
- flush_icache_range((uintptr_t)ptr, (uintptr_t)ptr + l);
+ flush_icache_range((uintptr_t)ram_ptr, (uintptr_t)ram_ptr + l);
break;
}
}
--
2.21.1
- Re: [PATCH v3 01/20] scripts/git.orderfile: Display Cocci scripts before code modifications, (continued)
- [PATCH v3 03/20] exec: Let qemu_ram_*() functions take a const pointer argument, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 04/20] exec: Rename ram_ptr variable,
Philippe Mathieu-Daudé <=
- [PATCH v3 05/20] exec: Let flatview API take void pointer arguments, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 06/20] exec: Let the address_space API use void pointer arguments, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 07/20] hw/net: Avoid casting non-const pointer, use address_space_write(), Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 08/20] Remove unnecessary cast when using the address_space API, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 09/20] exec: Let the cpu_[physical]_memory API use void pointer arguments, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 11/20] hw/ide/internal: Remove unused DMARestartFunc typedef, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 12/20] hw/ide: Let the DMAIntFunc prototype use a boolean 'is_write' argument, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 13/20] hw/virtio: Let virtqueue_map_iovec() use a boolean 'is_write' argument, Philippe Mathieu-Daudé, 2020/02/20
- [PATCH v3 14/20] hw/virtio: Let vhost_memory_map() use a boolean 'is_write' argument, Philippe Mathieu-Daudé, 2020/02/20