From: David Hildenbrand <david@redhat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>, qemu-devel@nongnu.org
Cc: Thomas Huth <thuth@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
Ilya Leoshkevich <iii@linux.ibm.com>,
qemu-s390x@nongnu.org
Subject: Re: [PATCH] target/s390x/cpu_models: Use 'first_cpu' in s390_get_feat_block()
Date: Mon, 30 Oct 2023 10:46:35 +0100 [thread overview]
Message-ID: <3a7a534b-75c5-44ad-95f6-d58eb3966978@redhat.com> (raw)
In-Reply-To: <20231030093150.65297-1-philmd@linaro.org>
On 30.10.23 10:31, Philippe Mathieu-Daudé wrote:
> 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>
> ---
> target/s390x/cpu_models.c | 6 +-----
> 1 file changed, 1 insertion(+), 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;
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
prev parent reply other threads:[~2023-10-30 9:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 9:31 [PATCH] target/s390x/cpu_models: Use 'first_cpu' in s390_get_feat_block() Philippe Mathieu-Daudé
2023-10-30 9:46 ` David Hildenbrand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3a7a534b-75c5-44ad-95f6-d58eb3966978@redhat.com \
--to=david@redhat.com \
--cc=iii@linux.ibm.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).