diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-10-30 10:31:50 +0100 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2023-11-07 19:27:08 +0100 |
commit | ad63e6d69326a2db0ed5ab8c9277b5b504a919a8 (patch) | |
tree | 956f0ea93b694a0b058f1830ecca7e409665a440 /target | |
parent | 81f993828bce9a9afd72da17b7672cb8bd121e63 (diff) |
target/s390x/cpu_models: Use 'first_cpu' in s390_get_feat_block()
We already have a global 'first_cpu' variable storing a pointer
to the first CPU, no need to use a static one.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20231030093150.65297-1-philmd@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/s390x/cpu_models.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 4dead48650..540d445023 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -196,11 +196,7 @@ uint32_t s390_get_ibc_val(void) void s390_get_feat_block(S390FeatType type, uint8_t *data) { - static S390CPU *cpu; - - if (!cpu) { - cpu = S390_CPU(qemu_get_cpu(0)); - } + S390CPU *cpu = S390_CPU(first_cpu); if (!cpu || !cpu->model) { return; |