qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, "Laurent Vivier" <laurent@vivier.eu>,
	"Artyom Tarasenko" <atar4qemu@gmail.com>,
	"Manos Pitsidianakis" <manos.pitsidianakis@linaro.org>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Michael Tokarev" <mjt@tls.msk.ru>,
	"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
	"Frederic Konrad" <konrad.frederic@yahoo.fr>,
	"Clément Chigot" <chigot@adacore.com>,
	qemu-trivial@nongnu.org, "Fabien Chouteau" <chouteau@adacore.com>
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	[thread overview]
Message-ID: <f9dd39e6-4ff1-4a05-944b-3cdd93fef82d@linaro.org> (raw)
In-Reply-To: <CAFEAcA_we0joWBdAeyhRAAWaTF_gZSSUVJTNv=jQwpS+cUUuGg@mail.gmail.com>

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	other threads:[~2024-02-15 14:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 13:28 [PATCH 0/2] hw/sparc/leon3: Trivial cleanups around write_bootloader() Philippe Mathieu-Daudé
2024-02-15 13:28 ` [PATCH 1/2] hw/sparc/leon3: Remove unused 'env' argument of write_bootloader() Philippe Mathieu-Daudé
2024-02-15 14:11   ` Peter Maydell
2024-02-15 13:28 ` [PATCH 2/2] hw/sparc/leon3: Have write_bootloader() take a void pointer argument Philippe Mathieu-Daudé
2024-02-15 14:13   ` Peter Maydell
2024-02-15 14:24     ` Philippe Mathieu-Daudé [this message]
2024-02-15 17:49 ` [PATCH 0/2] hw/sparc/leon3: Trivial cleanups around write_bootloader() Philippe Mathieu-Daudé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9dd39e6-4ff1-4a05-944b-3cdd93fef82d@linaro.org \
    --to=philmd@linaro.org \
    --cc=atar4qemu@gmail.com \
    --cc=chigot@adacore.com \
    --cc=chouteau@adacore.com \
    --cc=konrad.frederic@yahoo.fr \
    --cc=laurent@vivier.eu \
    --cc=manos.pitsidianakis@linaro.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mjt@tls.msk.ru \
    --cc=peter.maydell@linaro.org \
    --cc=pierrick.bouvier@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).