From: David Gibson <david@gibson.dropbear.id.au>
To: Greg Kurz <groug@kaod.org>
Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/3] spapr: drop duplicate variable in spapr_core_plug()
Date: Thu, 18 Jan 2018 11:31:30 +1100 [thread overview]
Message-ID: <20180118003130.GC30352@umbus.fritz.box> (raw)
In-Reply-To: <151618082784.20461.10973754439669848191.stgit@bahia.lan>
[-- Attachment #1: Type: text/plain, Size: 1245 bytes --]
On Wed, Jan 17, 2018 at 10:20:27AM +0100, Greg Kurz wrote:
> A variable is already defined at the begining of the function to
> hold a pointer to the CPU core object:
>
> sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(dev));
>
> No need to define it again in the pre-2.10 compatibility code snipplet.
>
> Signed-off-by: Greg Kurz <groug@kaod.org>
Applied to ppc-for-2.12, thanks.
> ---
> hw/ppc/spapr.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index 499ab647d882..bca838fce638 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
> @@ -3362,9 +3362,7 @@ static void spapr_core_plug(HotplugHandler *hotplug_dev, DeviceState *dev,
> int i;
>
> for (i = 0; i < cc->nr_threads; i++) {
> - sPAPRCPUCore *sc = SPAPR_CPU_CORE(dev);
> -
> - cs = CPU(sc->threads[i]);
> + cs = CPU(core->threads[i]);
> pre_2_10_vmstate_unregister_dummy_icp(cs->cpu_index);
> }
> }
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-01-18 1:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-17 9:20 [Qemu-devel] [PATCH 0/3] spapr: fix CPU device tree nodes Greg Kurz
2018-01-17 9:20 ` [Qemu-devel] [PATCH 1/3] spapr: drop duplicate variable in spapr_core_plug() Greg Kurz
2018-01-18 0:31 ` David Gibson [this message]
2018-01-17 9:20 ` [Qemu-devel] [PATCH 2/3] spapr_cpu_core: don't reset CPUs during realization Greg Kurz
2018-01-18 3:43 ` David Gibson
2018-01-18 15:39 ` Greg Kurz
2018-01-18 18:45 ` [Qemu-devel] [Qemu-ppc] " Greg Kurz
2018-01-18 23:30 ` [Qemu-devel] " David Gibson
2018-01-17 9:20 ` [Qemu-devel] [PATCH 3/3] spapr: fix device tree properties when using compatibility mode Greg Kurz
2018-01-18 4:07 ` David Gibson
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=20180118003130.GC30352@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=groug@kaod.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/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).