diff mbox series

[14/19] cpus: Replace first_cpu by qemu_get_cpu(0, TYPE_S390X_CPU)

Message ID 20231020163643.86105-15-philmd@linaro.org
State New
Headers show
Series cpus: Step toward removing global 'first_cpu' | expand

Commit Message

Philippe Mathieu-Daudé Oct. 20, 2023, 4:36 p.m. UTC
Mechanical change using the following coccinelle script:

  @@ @@
  -   first_cpu
  +   qemu_get_cpu(0, TYPE_S390_CPU)

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/s390x/ipl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index 377f43416c..1f2296f456 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -674,7 +674,7 @@  void s390_ipl_get_reset_request(CPUState **cs, enum s390_reset *reset_type)
     *cs = qemu_get_cpu(ipl->reset_cpu_index, TYPE_S390_CPU);
     if (!*cs) {
         /* use any CPU */
-        *cs = first_cpu;
+        *cs = qemu_get_cpu(0, TYPE_S390_CPU);
     }
     *reset_type = ipl->reset_type;
 }