From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [PATCH v3 05/11] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize Date: Wed, 06 Jan 2016 16:45:01 +0100 Message-ID: <1452095101.6096.55.camel@redhat.com> References: <1451994098-6972-1-git-send-email-kraxel@redhat.com> <1451994098-6972-6-git-send-email-kraxel@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org Sender: qemu-devel-bounces+gceq-qemu-devel=gmane.org@nongnu.org To: Stefano Stabellini Cc: igvt-g@ml01.01.org, xen-devel@lists.xensource.com, Eduardo Habkost , qemu-devel@nongnu.org, Cao jin , vfio-users@redhat.com List-Id: xen-devel@lists.xenproject.org > > =20 > > +static void (*i440fx_realize)(PCIDevice *pci_dev, Error **errp); > > static void igd_pt_i440fx_realize(PCIDevice *pci_dev, Error **errp) > > { > > + Error *err =3D NULL; > > uint32_t val =3D 0; > > int rc, i, num; > > int pos, len; >=20 > Can't we get the parent PCIDeviceClass realize function from pci_dev? So > that we don't have to introduce i440fx_realize? I don't think so ... > > =20 > > + i440fx_realize =3D k->realize; > > k->realize =3D igd_pt_i440fx_realize; ... because we are overriding it right here. cheers, Gerd