From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47561) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3NjC-0005MM-4z for qemu-devel@nongnu.org; Sun, 28 Jul 2013 05:57:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3Nj5-0001uq-M5 for qemu-devel@nongnu.org; Sun, 28 Jul 2013 05:57:26 -0400 Received: from cantor2.suse.de ([195.135.220.15]:57079 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3Nj5-0001um-FA for qemu-devel@nongnu.org; Sun, 28 Jul 2013 05:57:19 -0400 Message-ID: <51F4EAFA.3070106@suse.de> Date: Sun, 28 Jul 2013 11:57:14 +0200 From: =?ISO-8859-15?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1374996553-21828-1-git-send-email-imammedo@redhat.com> <1374996553-21828-3-git-send-email-imammedo@redhat.com> In-Reply-To: <1374996553-21828-3-git-send-email-imammedo@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 2/6] pc: add I440FX QOM cast macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mammedov Cc: qemu-devel@nongnu.org, mst@redhat.com Am 28.07.2013 09:29, schrieb Igor Mammedov: > Signed-off-by: Igor Mammedov > --- > hw/pci-host/piix.c | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c > index 3908860..bf879e7 100644 > --- a/hw/pci-host/piix.c > +++ b/hw/pci-host/piix.c > @@ -38,6 +38,10 @@ > * http://download.intel.com/design/chipsets/datashts/29054901.pdf > */ > =20 > +#define TYPE_I440FX_PCI_HOST "i440FX-pcihost" > +#define I440FX_PCI_HOST(obj) \ > + OBJECT_CHECK(I440FXState, (obj), TYPE_I440FX_PCI_HOST) Either Anthony or mst had insisted on PCI_HOST_BRIDGE rather than PCI_HOST. Other than that looks good, thanks! Andreas > + > typedef struct I440FXState { > PCIHostState parent_obj; > } I440FXState; > @@ -257,7 +261,7 @@ static PCIBus *i440fx_common_init(const char *devic= e_name, > PCII440FXState *f; > unsigned i; > =20 > - dev =3D qdev_create(NULL, "i440FX-pcihost"); > + dev =3D qdev_create(NULL, TYPE_I440FX_PCI_HOST); > s =3D PCI_HOST_BRIDGE(dev); > b =3D pci_bus_new(dev, NULL, pci_address_space, > address_space_io, 0, TYPE_PCI_BUS); > @@ -661,7 +665,7 @@ static void i440fx_pcihost_class_init(ObjectClass *= klass, void *data) > } > =20 > static const TypeInfo i440fx_pcihost_info =3D { > - .name =3D "i440FX-pcihost", > + .name =3D TYPE_I440FX_PCI_HOST, > .parent =3D TYPE_PCI_HOST_BRIDGE, > .instance_size =3D sizeof(I440FXState), > .instance_init =3D i440fx_pcihost_initfn, >=20 --=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