From: "Michael S. Tsirkin" <mst@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: Markus Armbruster <armbru@pond.sub.org>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 09/13] isa: Trivially convert remaining PCI-ISA bridges to realize()
Date: Thu, 17 Dec 2015 15:37:51 +0200 [thread overview]
Message-ID: <20151217153736-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1450354795-31608-10-git-send-email-armbru@redhat.com>
On Thu, Dec 17, 2015 at 01:19:51PM +0100, Markus Armbruster wrote:
> These are "ICH9-LPC" and "ebus".
>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
> Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/isa/lpc_ich9.c | 5 ++---
> hw/sparc64/sun4u.c | 6 ++----
> 2 files changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
> index 1ffc803..8e58449 100644
> --- a/hw/isa/lpc_ich9.c
> +++ b/hw/isa/lpc_ich9.c
> @@ -602,7 +602,7 @@ static void ich9_lpc_initfn(Object *obj)
> ich9_lpc_add_properties(lpc);
> }
>
> -static int ich9_lpc_init(PCIDevice *d)
> +static void ich9_lpc_realize(PCIDevice *d, Error **errp)
> {
> ICH9LPCState *lpc = ICH9_LPC_DEVICE(d);
> ISABus *isa_bus;
> @@ -628,7 +628,6 @@ static int ich9_lpc_init(PCIDevice *d)
> memory_region_add_subregion_overlap(pci_address_space_io(d),
> ICH9_RST_CNT_IOPORT, &lpc->rst_cnt_mem,
> 1);
> - return 0;
> }
>
> static void ich9_device_plug_cb(HotplugHandler *hotplug_dev,
> @@ -706,7 +705,7 @@ static void ich9_lpc_class_init(ObjectClass *klass, void *data)
>
> set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
> dc->reset = ich9_lpc_reset;
> - k->init = ich9_lpc_init;
> + k->realize = ich9_lpc_realize;
> dc->vmsd = &vmstate_ich9_lpc;
> dc->props = ich9_lpc_properties;
> k->config_write = ich9_lpc_config_write;
> diff --git a/hw/sparc64/sun4u.c b/hw/sparc64/sun4u.c
> index d6b929c..c37e8b0 100644
> --- a/hw/sparc64/sun4u.c
> +++ b/hw/sparc64/sun4u.c
> @@ -593,8 +593,7 @@ pci_ebus_init(PCIBus *bus, int devfn, qemu_irq *irqs)
> return isa_bus;
> }
>
> -static int
> -pci_ebus_init1(PCIDevice *pci_dev)
> +static void pci_ebus_realize(PCIDevice *pci_dev, Error **errp)
> {
> EbusState *s = DO_UPCAST(EbusState, pci_dev, pci_dev);
>
> @@ -614,14 +613,13 @@ pci_ebus_init1(PCIDevice *pci_dev)
> memory_region_init_alias(&s->bar1, OBJECT(s), "bar1", get_system_io(),
> 0, 0x4000);
> pci_register_bar(pci_dev, 1, PCI_BASE_ADDRESS_SPACE_IO, &s->bar1);
> - return 0;
> }
>
> static void ebus_class_init(ObjectClass *klass, void *data)
> {
> PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
>
> - k->init = pci_ebus_init1;
> + k->realize = pci_ebus_realize;
> k->vendor_id = PCI_VENDOR_ID_SUN;
> k->device_id = PCI_DEVICE_ID_SUN_EBUS;
> k->revision = 0x01;
> --
> 2.4.3
next prev parent reply other threads:[~2015-12-17 13:38 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-17 12:19 [Qemu-devel] [PATCH v2 00/13] Clean up some hw_error() misuse Markus Armbruster
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 01/13] hw: Don't use hw_error() for machine initialization errors Markus Armbruster
2015-12-17 14:39 ` Thomas Huth
2015-12-17 16:34 ` Richard Henderson
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 02/13] omap: Don't use hw_error() in device init() methods Markus Armbruster
2015-12-17 14:30 ` Thomas Huth
2015-12-17 14:50 ` Peter Maydell
2015-12-17 15:45 ` Markus Armbruster
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 03/13] arm_mptimer: Don't use hw_error() in realize() method Markus Armbruster
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 04/13] etraxfs_eth: Don't use hw_error() in init() method Markus Armbruster
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 05/13] raven: Mark use of hw_error() in realize() FIXME Markus Armbruster
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 06/13] error: Don't append a newline when printing the error hint Markus Armbruster
2015-12-17 15:50 ` Eric Blake
2015-12-17 16:19 ` Markus Armbruster
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 07/13] hw/arm/virt: Fix property "gic-version" error handling Markus Armbruster
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 08/13] sysbus: Don't use hw_error() in machine_init_done_notifiers Markus Armbruster
2015-12-17 14:33 ` Thomas Huth
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 09/13] isa: Trivially convert remaining PCI-ISA bridges to realize() Markus Armbruster
2015-12-17 13:37 ` Michael S. Tsirkin [this message]
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 10/13] isa: Clean up error handling around isa_bus_new() Markus Armbruster
2015-12-17 13:41 ` Michael S. Tsirkin
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 11/13] isa: Clean up inappropriate hw_error() Markus Armbruster
2015-12-17 13:39 ` Michael S. Tsirkin
2015-12-17 14:27 ` Markus Armbruster
2015-12-17 14:37 ` Michael S. Tsirkin
2015-12-17 16:38 ` Richard Henderson
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 12/13] audio: Clean up inappropriate and unreachable use of hw_error() Markus Armbruster
2015-12-17 12:19 ` [Qemu-devel] [PATCH v2 13/13] xen-hvm: Mark inappropriate error handling FIXME Markus Armbruster
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=20151217153736-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=armbru@pond.sub.org \
--cc=armbru@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--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).