From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:36030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbCyX-0006Zn-5J for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:12:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RbCyT-000282-5Z for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:12:01 -0500 Received: from e36.co.us.ibm.com ([32.97.110.154]:50198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RbCyT-000258-0C for qemu-devel@nongnu.org; Thu, 15 Dec 2011 10:11:57 -0500 Received: from /spool/local by e36.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 15 Dec 2011 08:11:33 -0700 Received: from d03av06.boulder.ibm.com (d03av06.boulder.ibm.com [9.17.195.245]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pBFFATTo097628 for ; Thu, 15 Dec 2011 08:10:29 -0700 Received: from d03av06.boulder.ibm.com (loopback [127.0.0.1]) by d03av06.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pBFFAPHJ011742 for ; Thu, 15 Dec 2011 08:10:25 -0700 Message-ID: <4EEA0DDC.1060503@us.ibm.com> Date: Thu, 15 Dec 2011 09:10:20 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1323907817-27342-1-git-send-email-aliguori@us.ibm.com> <20111215081729.GB26425@stefanha-thinkpad.localdomain> In-Reply-To: <20111215081729.GB26425@stefanha-thinkpad.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] usb-ohci: return USBBus in usb_ohci_init_pci List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org On 12/15/2011 02:17 AM, Stefan Hajnoczi wrote: > On Wed, Dec 14, 2011 at 06:10:17PM -0600, Anthony Liguori wrote: >> Untested, but seemingly obvious and hard to screw up.. > > Sounds like a challenge so let's take a look... > >> -void usb_ohci_init_pci(struct PCIBus *bus, int devfn) >> +USBBus *usb_ohci_init_pci(struct PCIBus *bus, int devfn) >> { >> - pci_create_simple(bus, devfn, "pci-ohci"); >> + PCIDevice *dev = pci_create_simple(bus, devfn, "pci-ohci"); >> + OHCIPCIState *ohci = DO_UPCAST(OHCIPCIState, pci_dev, dev); >> + >> + return&ohci->state.bus > > Missing semicolon. Heh, awesome :-) Okay, I'll actually test it next time. Regards, Anthony Liguori > > Stefan > >