From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4/4] hw/pci: remove obsolete PCIDevice->init()
Date: Mon, 12 Mar 2018 02:03:17 +0200 [thread overview]
Message-ID: <20180312020236-mutt-send-email-mst@kernel.org> (raw)
In-Reply-To: <42aa5fe6-1cf0-4912-a773-72cc8950afb5@amsat.org>
On Sun, Mar 11, 2018 at 04:46:52PM +0100, Philippe Mathieu-Daudé wrote:
> Hi Michael, Paolo.
>
> Now than all other PCI QOM'ification patches got applied, can you take
> this patch for 2.12?
>
> Thanks,
>
> Phil.
>
> On 12/17/2017 09:49 PM, Philippe Mathieu-Daudé wrote:
> > All PCI devices are now QOM'ified.
> >
> > 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;
How about we assert !init here?
+ assert(!pc->init);
> > }
> >
> > static void pci_device_class_base_init(ObjectClass *klass, void *data)
> >
next prev parent reply other threads:[~2018-03-12 0:03 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
2018-03-11 15:46 ` Philippe Mathieu-Daudé
2018-03-12 0:03 ` Michael S. Tsirkin [this message]
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=20180312020236-mutt-send-email-mst@kernel.org \
--to=mst@redhat.com \
--cc=f4bug@amsat.org \
--cc=marcel@redhat.com \
--cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.