From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50238) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YY8MN-0006Gk-Mz for qemu-devel@nongnu.org; Wed, 18 Mar 2015 03:25:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YY8MK-0001Wz-81 for qemu-devel@nongnu.org; Wed, 18 Mar 2015 03:25:47 -0400 Message-ID: <5509277A.9030705@huawei.com> Date: Wed, 18 Mar 2015 15:21:30 +0800 From: Gonglei MIME-Version: 1.0 References: <1426643370-15804-1-git-send-email-arei.gonglei@huawei.com> <1426643370-15804-2-git-send-email-arei.gonglei@huawei.com> <1426662159.32192.4.camel@nilsson.home.kraxel.org> In-Reply-To: <1426662159.32192.4.camel@nilsson.home.kraxel.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 1/3] uhci: fix segfault when hot-unplugging uhci controller List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: qemu-stable , qemu-devel@nongnu.org, peter.huangpeng@huawei.com On 2015/3/18 15:02, Gerd Hoffmann wrote: > Hi, > >> -static void uhci_reset(void *opaque) >> +static void uhci_reset(DeviceState *dev) >> { >> - UHCIState *s = opaque; >> + PCIDevice *d = PCI_DEVICE(dev); >> + UHCIState *s = DO_UPCAST(UHCIState, dev, d); > > Uh, oh, DO_UPCAST() is long deprecated. There are other instances of > this in the uhci emulation though, so we need a cleanup & qom-ify pass > for the code anyway. So I think it's ok for a bugfix patch. > Yes, I noticed that, but I haven't a good idea for qom-ifing uhci. :) May we refer to the realization of ehci ? > I'll queue it up (and the other two too of course). > Thanks. Regards, -Gonglei