qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hw/sparc/leon3: Remove unnecessary CPU() QOM cast
@ 2025-10-02  3:36 Philippe Mathieu-Daudé
  2025-10-02  6:46 ` Clément Chigot
  2025-10-07  8:25 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-10-02  3:36 UTC (permalink / raw)
  To: qemu-devel
  Cc: Artyom Tarasenko, Clément Chigot, Mark Cave-Ayland,
	Frederic Konrad, Philippe Mathieu-Daudé

env_cpu() already returns a CPUState type, no need to cast.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 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



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] hw/sparc/leon3: Remove unnecessary CPU() QOM cast
  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
  2025-10-07  8:25 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Clément Chigot @ 2025-10-02  6:46 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Artyom Tarasenko, Mark Cave-Ayland, Frederic Konrad

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
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] hw/sparc/leon3: Remove unnecessary CPU() QOM cast
  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
@ 2025-10-07  8:25 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-10-07  8:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Artyom Tarasenko, Clément Chigot, Mark Cave-Ayland,
	Frederic Konrad

On 2/10/25 05:36, Philippe Mathieu-Daudé wrote:
> env_cpu() already returns a CPUState type, no need to cast.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   hw/sparc/leon3.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Patch queued, thanks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-10-07  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2025-10-07  8:25 ` Philippe Mathieu-Daudé

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).