qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Clément Chigot" <chigot@adacore.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, Artyom Tarasenko <atar4qemu@gmail.com>,
	 Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	Frederic Konrad <konrad.frederic@yahoo.fr>
Subject: Re: [PATCH] hw/sparc/leon3: Remove unnecessary CPU() QOM cast
Date: Thu, 2 Oct 2025 08:46:33 +0200	[thread overview]
Message-ID: <CAJ307Eh7Xq-dBpbN-hb+e46gSbm66NbeUGnhE-ktPbCamFEJBQ@mail.gmail.com> (raw)
In-Reply-To: <20251002033623.26800-1-philmd@linaro.org>

On Thu, Oct 2, 2025 at 5:36 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> env_cpu() already returns a CPUState type, no need to cast.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Clément Chigot <chigot@adacore.com>

> ---
>  hw/sparc/leon3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c
> index 0aeaad3becc..09d2cec488c 100644
> --- a/hw/sparc/leon3.c
> +++ b/hw/sparc/leon3.c
> @@ -192,7 +192,7 @@ static void leon3_cache_control_int(CPUSPARCState *env)
>
>  static void leon3_irq_ack(CPUSPARCState *env, int intno)
>  {
> -    CPUState *cpu = CPU(env_cpu(env));
> +    CPUState *cpu = env_cpu(env);
>      grlib_irqmp_ack(env->irq_manager, cpu->cpu_index, intno);
>  }
>
> --
> 2.51.0
>


  reply	other threads:[~2025-10-02  6:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-02  3:36 [PATCH] hw/sparc/leon3: Remove unnecessary CPU() QOM cast Philippe Mathieu-Daudé
2025-10-02  6:46 ` Clément Chigot [this message]
2025-10-07  8:25 ` 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=CAJ307Eh7Xq-dBpbN-hb+e46gSbm66NbeUGnhE-ktPbCamFEJBQ@mail.gmail.com \
    --to=chigot@adacore.com \
    --cc=atar4qemu@gmail.com \
    --cc=konrad.frederic@yahoo.fr \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@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).