From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGqGt-00009D-Mi for qemu-devel@nongnu.org; Wed, 06 Jan 2016 10:45:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aGqGp-0005jy-MB for qemu-devel@nongnu.org; Wed, 06 Jan 2016 10:45:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aGqGp-0005jd-HL for qemu-devel@nongnu.org; Wed, 06 Jan 2016 10:45:07 -0500 Message-ID: <1452095101.6096.55.camel@redhat.com> From: Gerd Hoffmann Date: Wed, 06 Jan 2016 16:45:01 +0100 In-Reply-To: References: <1451994098-6972-1-git-send-email-kraxel@redhat.com> <1451994098-6972-6-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v3 05/11] igd: TYPE_IGD_PASSTHROUGH_I440FX_PCI_DEVICE: call parent realize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 > > =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 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