On Thu, 15 Feb 2024 at 13:28, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
Directly use the void pointer argument returned
by memory_region_get_ram_ptr().
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/sparc/leon3.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
-static void write_bootloader(uint8_t *base, hwaddr kernel_addr)
+static void write_bootloader(void *ptr, hwaddr kernel_addr)
{
- uint32_t *p = (uint32_t *) base;
+ uint32_t *p = (uint32_t *) ptr;
I don't think you need the cast any more now ptr is void*.
(If you do, then our coding style doesn't put a space after
the cast.)