From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtFjw-0004Sb-Ee for qemu-devel@nongnu.org; Sun, 30 Jun 2013 07:24:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UtFju-0006Om-36 for qemu-devel@nongnu.org; Sun, 30 Jun 2013 07:24:20 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47840 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UtFjt-0006Oa-RG for qemu-devel@nongnu.org; Sun, 30 Jun 2013 07:24:17 -0400 Message-ID: <51D0155D.6020806@suse.de> Date: Sun, 30 Jun 2013 13:24:13 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <9c7472accbd24d1720a257a63109897a96dfed55.1372055322.git.peter.crosthwaite@xilinx.com> <51CFDF72.2060000@suse.de> In-Reply-To: <51CFDF72.2060000@suse.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 03/30] net/pcnet-pci: QOM Upcast Sweep List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: peter.crosthwaite@xilinx.com Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, mst@redhat.com Am 30.06.2013 09:34, schrieb Andreas F=E4rber: > Am 24.06.2013 08:52, schrieb peter.crosthwaite@xilinx.com: >> From: Peter Crosthwaite >> >> Define and use standard QOM cast macro. Remove usages of DO_UPCAST >> and direct -> style upcasting. >> >> Signed-off-by: Peter Crosthwaite >> --- >> >> hw/net/pcnet-pci.c | 14 +++++++++----- >> 1 file changed, 9 insertions(+), 5 deletions(-) >> >> diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c >> index 9df2b87..b1afbf4 100644 >> --- a/hw/net/pcnet-pci.c >> +++ b/hw/net/pcnet-pci.c >> @@ -43,6 +43,10 @@ >> //#define PCNET_DEBUG_TMD >> //#define PCNET_DEBUG_MATCH >> =20 >> +#define TYPE_PCI_PC_NET "pcnet" >=20 > I'm wondering whether we should rename this PCNET rather than PC_NET, > but I'm queuing it as is. Thanks, Squashing the following. Andreas diff --git a/hw/net/pcnet-pci.c b/hw/net/pcnet-pci.c index b1afbf4..6ae27b4 100644 --- a/hw/net/pcnet-pci.c +++ b/hw/net/pcnet-pci.c @@ -49,7 +49,10 @@ OBJECT_CHECK(PCIPCNetState, (obj), TYPE_PCI_PC_NET) typedef struct { - PCIDevice pci_dev; + /*< private >*/ + PCIDevice parent_obj; + /*< public >*/ + PCNetState state; MemoryRegion io_bar; } PCIPCNetState; @@ -240,7 +243,7 @@ static const VMStateDescription vmstate_pci_pcnet =3D= { .minimum_version_id =3D 2, .minimum_version_id_old =3D 2, .fields =3D (VMStateField []) { - VMSTATE_PCI_DEVICE(pci_dev, PCIPCNetState), + VMSTATE_PCI_DEVICE(parent_obj, PCIPCNetState), VMSTATE_STRUCT(state, PCIPCNetState, 0, vmstate_pcnet, PCNetStat= e), VMSTATE_END_OF_LIST() } --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg