From: Thomas Huth <thuth@redhat.com>
To: David Gibson <david@gibson.dropbear.id.au>
Cc: lvivier@redhat.com, qemu-devel@nongnu.org,
mdroth@linux.vnet.ibm.com, agraf@suse.de, qemu-ppc@nongnu.org,
bharata@linux.vnet.ibm.com, afaerber@suse.de
Subject: Re: [Qemu-devel] [PATCHv2 1/4] spapr: Merge sPAPREnvironment into sPAPRMachineState
Date: Tue, 26 May 2015 09:10:40 +0200 [thread overview]
Message-ID: <20150526091040.66f50f50@thh440s> (raw)
In-Reply-To: <1432606979-28556-2-git-send-email-david@gibson.dropbear.id.au>
On Tue, 26 May 2015 12:22:56 +1000
David Gibson <david@gibson.dropbear.id.au> wrote:
> The code for -machine pseries maintains a global sPAPREnvironment structure
> which keeps track of general state information about the guest platform.
> This predates the existence of the MachineState structure, but performs
> basically the same function.
>
> Now that we have the generic MachineState, fold sPAPREnvironment into
> sPAPRMachineState, the pseries specific subclass of MachineState.
>
> This is mostly a matter of search and replace, although a few places which
> relied on the global spapr variable are changed to find the structure via
> qdev_get_machine().
>
> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/char/spapr_vty.c | 6 ++--
> hw/intc/xics.c | 20 ++++++-------
> hw/intc/xics_kvm.c | 2 +-
> hw/net/spapr_llan.c | 12 ++++----
> hw/nvram/spapr_nvram.c | 4 +--
> hw/ppc/spapr.c | 73 +++++++++++++++++++--------------------------
> hw/ppc/spapr_events.c | 13 +++++---
> hw/ppc/spapr_hcall.c | 36 +++++++++++-----------
> hw/ppc/spapr_iommu.c | 8 ++---
> hw/ppc/spapr_pci.c | 37 ++++++++++++-----------
> hw/ppc/spapr_rtas.c | 38 +++++++++++------------
> hw/ppc/spapr_rtc.c | 4 +--
> hw/ppc/spapr_vio.c | 15 +++++-----
> include/hw/pci-host/spapr.h | 10 ++++---
> include/hw/ppc/spapr.h | 33 ++++++++++++++------
> include/hw/ppc/spapr_vio.h | 4 ++-
> 16 files changed, 167 insertions(+), 148 deletions(-)
[...]
> diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
> index f069609..0016f25 100644
> --- a/hw/ppc/spapr.c
> +++ b/hw/ppc/spapr.c
[...]
> @@ -1756,17 +1743,17 @@ static char *spapr_get_fw_dev_path(FWPathProvider *p, BusState *bus,
>
> static char *spapr_get_kvm_type(Object *obj, Error **errp)
> {
> - sPAPRMachineState *sm = SPAPR_MACHINE(obj);
> + sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
>
> - return g_strdup(sm->kvm_type);
> + return g_strdup(spapr->kvm_type);
> }
>
> static void spapr_set_kvm_type(Object *obj, const char *value, Error **errp)
> {
> - sPAPRMachineState *sm = SPAPR_MACHINE(obj);
> + sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
>
> - g_free(sm->kvm_type);
> - sm->kvm_type = g_strdup(value);
> + g_free(spapr->kvm_type);
> + spapr->kvm_type = g_strdup(value);
> }
I think you could keep the "sm" variable name in these two functions.
Anyway, patch looks good to me now, so:
Reviewed-by: Thomas Huth <thuth@redhat.com>
next prev parent reply other threads:[~2015-05-26 7:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 2:22 [Qemu-devel] [PATCHv2 0/4] sPAPRMachineState cleanups David Gibson
2015-05-26 2:22 ` [Qemu-devel] [PATCHv2 1/4] spapr: Merge sPAPREnvironment into sPAPRMachineState David Gibson
2015-05-26 7:10 ` Thomas Huth [this message]
2015-05-26 2:22 ` [Qemu-devel] [PATCHv2 2/4] spapr: Remove obsolete ram_limit field from sPAPRMachineState David Gibson
2015-05-26 8:00 ` Thomas Huth
2015-05-29 1:33 ` David Gibson
2015-05-26 2:22 ` [Qemu-devel] [PATCHv2 3/4] spapr: Remove obsolete entry_point " David Gibson
2015-05-26 8:01 ` Thomas Huth
2015-05-26 2:22 ` [Qemu-devel] [PATCHv2 4/4] spapr: Add sPAPRMachineClass David Gibson
2015-05-26 8:19 ` Thomas Huth
2015-05-29 1:35 ` 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=20150526091040.66f50f50@thh440s \
--to=thuth@redhat.com \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=bharata@linux.vnet.ibm.com \
--cc=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--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).