qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] hw/sparc/leon3: Have write_bootloader() take a void poin


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 2/2] hw/sparc/leon3: Have write_bootloader() take a void pointer argument
Date: Thu, 15 Feb 2024 15:24:14 +0100
User-agent: Mozilla Thunderbird

On 15/2/24 15:13, Peter Maydell wrote:
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.)

Right, updated.

Either way,
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

Thank you!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]