Received: from [140.186.70.92] (port=58541 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OQdl2-0001tI-8M for qemu-devel@nongnu.org; Mon, 21 Jun 2010 05:57:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OQdl1-0004Yv-59 for qemu-devel@nongnu.org; Mon, 21 Jun 2010 05:57:36 -0400 Received: from mail.valinux.co.jp ([210.128.90.3]:48519) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OQdl0-0004Yk-SO for qemu-devel@nongnu.org; Mon, 21 Jun 2010 05:57:35 -0400 Date: Mon, 21 Jun 2010 18:53:50 +0900 From: Isaku Yamahata Subject: Re: [Qemu-devel] [PATCH] pci hotplug: make pci hotplug return value to caller. Message-ID: <20100621095350.GC18250@valinux.co.jp> References: <20100615034727.GT23473@valinux.co.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100615034727.GT23473@valinux.co.jp> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , "Michael S. Tsirkin" Ping. Michael, is there any issues to address? On Tue, Jun 15, 2010 at 12:47:27PM +0900, Isaku Yamahata wrote: > Make pci hotplug callback return value to caller. > There is no reason to discard return value. > > Signed-off-by: Isaku Yamahata > --- > hw/pci.c | 11 +++++++---- > 1 files changed, 7 insertions(+), 4 deletions(-) > > diff --git a/hw/pci.c b/hw/pci.c > index 7787005..3777c1c 100644 > --- a/hw/pci.c > +++ b/hw/pci.c > @@ -1623,8 +1623,12 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base) > pci_dev->romfile = qemu_strdup(info->romfile); > pci_add_option_rom(pci_dev); > > - if (qdev->hotplugged) > - bus->hotplug(bus->hotplug_qdev, pci_dev, 1); > + if (qdev->hotplugged) { > + rc = bus->hotplug(bus->hotplug_qdev, pci_dev, 1); > + if (rc != 0) { > + return rc; > + } > + } > return 0; > } > > @@ -1632,8 +1636,7 @@ static int pci_unplug_device(DeviceState *qdev) > { > PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev); > > - dev->bus->hotplug(dev->bus->hotplug_qdev, dev, 0); > - return 0; > + return dev->bus->hotplug(dev->bus->hotplug_qdev, dev, 0); > } > > void pci_qdev_register(PCIDeviceInfo *info) > -- > 1.6.6.1 > > > -- yamahata