From: Marcel Apfelbaum <marcel@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Eduardo Habkost" <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/4] hw/pci: remove obsolete PCIDevice->init()
Date: Mon, 18 Dec 2017 09:07:52 +0200 [thread overview]
Message-ID: <00f819e6-4253-7f74-f3a5-cbe1059b3d2c@redhat.com> (raw)
In-Reply-To: <20171217204912.12420-5-f4bug@amsat.org>
On 17/12/2017 22:49, Philippe Mathieu-Daudé wrote:
> All PCI devices are now QOM'ified.
>
Finally!
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> include/hw/pci/pci.h | 1 -
> hw/pci/pci.c | 14 --------------
> 2 files changed, 15 deletions(-)
>
> diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
> index 8d02a0a383..0f1ed64c2f 100644
> --- a/include/hw/pci/pci.h
> +++ b/include/hw/pci/pci.h
> @@ -217,7 +217,6 @@ typedef struct PCIDeviceClass {
> DeviceClass parent_class;
>
> void (*realize)(PCIDevice *dev, Error **errp);
> - int (*init)(PCIDevice *dev);/* TODO convert to realize() and remove */
> PCIUnregisterFunc *exit;
> PCIConfigReadFunc *config_read;
> PCIConfigWriteFunc *config_write;
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index b2d139bd9a..cd25ab6f6b 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -2054,18 +2054,6 @@ static void pci_qdev_realize(DeviceState *qdev, Error **errp)
> }
> }
>
> -static void pci_default_realize(PCIDevice *dev, Error **errp)
> -{
> - PCIDeviceClass *pc = PCI_DEVICE_GET_CLASS(dev);
> -
> - if (pc->init) {
> - if (pc->init(dev) < 0) {
> - error_setg(errp, "Device initialization failed");
> - return;
> - }
> - }
> -}
> -
> PCIDevice *pci_create_multifunction(PCIBus *bus, int devfn, bool multifunction,
> const char *name)
> {
> @@ -2538,13 +2526,11 @@ MemoryRegion *pci_address_space_io(PCIDevice *dev)
> static void pci_device_class_init(ObjectClass *klass, void *data)
> {
> DeviceClass *k = DEVICE_CLASS(klass);
> - PCIDeviceClass *pc = PCI_DEVICE_CLASS(klass);
>
> k->realize = pci_qdev_realize;
> k->unrealize = pci_qdev_unrealize;
> k->bus_type = TYPE_PCI_BUS;
> k->props = pci_props;
> - pc->realize = pci_default_realize;
> }
>
> static void pci_device_class_base_init(ObjectClass *klass, void *data)
>
Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Thanks,
Marcel
next prev parent reply other threads:[~2017-12-18 7:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-17 20:49 [Qemu-devel] [PATCH 0/4] QOM'ify PCIDevices Philippe Mathieu-Daudé
2017-12-17 20:49 ` [Qemu-devel] [PATCH 1/4] hw/block/nvme: QOM'ify PCI NVME Philippe Mathieu-Daudé
2017-12-17 20:49 ` [Qemu-devel] [PATCH 2/4] hw/pci-host/piix: QOM'ify the IGD Passthrough host bridge Philippe Mathieu-Daudé
2017-12-18 7:05 ` Marcel Apfelbaum
2017-12-18 14:54 ` Philippe Mathieu-Daudé
2017-12-18 14:59 ` Philippe Mathieu-Daudé
2017-12-17 20:49 ` [Qemu-devel] [PATCH 3/4] hw/pci-host/xilinx: QOM'ify the AXI-PCIe " Philippe Mathieu-Daudé
2017-12-18 7:15 ` Marcel Apfelbaum
2017-12-18 15:11 ` Philippe Mathieu-Daudé
2017-12-17 20:49 ` [Qemu-devel] [PATCH 4/4] hw/pci: remove obsolete PCIDevice->init() Philippe Mathieu-Daudé
2017-12-18 7:07 ` Marcel Apfelbaum [this message]
2018-03-11 15:46 ` Philippe Mathieu-Daudé
2018-03-12 0:03 ` Michael S. Tsirkin
2018-03-12 0:04 ` Michael S. Tsirkin
2018-03-12 10:57 ` Philippe Mathieu-Daudé
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=00f819e6-4253-7f74-f3a5-cbe1059b3d2c@redhat.com \
--to=marcel@redhat.com \
--cc=ehabkost@redhat.com \
--cc=f4bug@amsat.org \
--cc=mst@redhat.com \
--cc=qemu-devel@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).