diff --git a/qemu/memory.c b/qemu/memory.c index 3577cc14..94669f96 100644 --- a/qemu/memory.c +++ b/qemu/memory.c @@ -521,13 +521,14 @@ static MemTxResult access_with_adjusted_size(hwaddr addr, unsigned size, unsigned access_size_min, unsigned access_size_max, - MemTxResult (*access)(MemoryRegion *mr, - hwaddr addr, - uint64_t *value, - unsigned size, - unsigned shift, - uint64_t mask, - MemTxAttrs attrs), + MemTxResult (*access_fn) + (MemoryRegion *mr, + hwaddr addr, + uint64_t *value, + unsigned size, + unsigned shift, + uint64_t mask, + MemTxAttrs attrs), MemoryRegion *mr, MemTxAttrs attrs) { @@ -548,13 +549,13 @@ static MemTxResult access_with_adjusted_size(hwaddr addr, access_mask = (0-1ULL) >> (64 - access_size * 8); if (memory_region_big_endian(mr)) { for (i = 0; i < size; i += access_size) { - r |= access(mr, addr + i, value, access_size, - (size - access_size - i) * 8, access_mask, attrs); + r |= access_fn(mr, addr + i, value, access_size, + (size - access_size - i) * 8, access_mask, attrs); } } else { for (i = 0; i < size; i += access_size) { - r |= access(mr, addr + i, value, access_size, i * 8, - access_mask, attrs); + r |= access_fn(mr, addr + i, value, access_size, i * 8, + access_mask, attrs); } } return r;