Skip to content

Commit

Permalink
target/s390x/cpu_models: Use 'first_cpu' in s390_get_feat_block()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
philmd authored and huth committed Nov 7, 2023
1 parent 81f9938 commit ad63e6d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions target/s390x/cpu_models.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ad63e6d

Please sign in to comment.