qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 01/10] hw/core/generic-loader: Do not open-code cpu_set_pc


From: Richard Henderson
Subject: Re: [PATCH v2 01/10] hw/core/generic-loader: Do not open-code cpu_set_pc()
Date: Fri, 24 Jan 2025 11:25:29 -0800
User-agent: Mozilla Thunderbird

On 1/22/25 01:30, Philippe Mathieu-Daudé wrote:
Directly call cpu_set_pc() instead of open-coding it.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  hw/core/generic-loader.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c
index fb354693aff..1b9ab600c9c 100644
--- a/hw/core/generic-loader.c
+++ b/hw/core/generic-loader.c
@@ -48,11 +48,8 @@ static void generic_loader_reset(void *opaque)
      GenericLoaderState *s = GENERIC_LOADER(opaque);
if (s->set_pc) {
-        CPUClass *cc = CPU_GET_CLASS(s->cpu);
          cpu_reset(s->cpu);
-        if (cc) {
-            cc->set_pc(s->cpu, s->addr);
-        }
+        cpu_set_pc(s->cpu, s->addr);
      }
if (s->data_len) {

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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