From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6zUT-0000h1-Mn for qemu-devel@nongnu.org; Thu, 10 Dec 2015 06:34:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a6zUP-0000dl-Ik for qemu-devel@nongnu.org; Thu, 10 Dec 2015 06:34:29 -0500 Received: from mail-wm0-x236.google.com ([2a00:1450:400c:c09::236]:35652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a6zUP-0000d4-CX for qemu-devel@nongnu.org; Thu, 10 Dec 2015 06:34:25 -0500 Received: by mail-wm0-x236.google.com with SMTP id u63so19769621wmu.0 for ; Thu, 10 Dec 2015 03:34:25 -0800 (PST) References: <1449743372-17169-1-git-send-email-armbru@redhat.com> <1449743372-17169-9-git-send-email-armbru@redhat.com> From: Marcel Apfelbaum Message-ID: <5669633E.4070700@gmail.com> Date: Thu, 10 Dec 2015 13:34:22 +0200 MIME-Version: 1.0 In-Reply-To: <1449743372-17169-9-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 08/12] isa: Trivially convert remaining PCI-ISA bridges to realize() Reply-To: marcel@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: Mark Cave-Ayland , "Michael S. Tsirkin" On 12/10/2015 12:29 PM, Markus Armbruster wrote: > These are "ICH9-LPC" and "ebus". > > Cc: "Michael S. Tsirkin" > Cc: Mark Cave-Ayland > Signed-off-by: Markus Armbruster > --- > 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; > Reviewed-by: Marcel Apfelbaum