From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YY80E-0005xm-2m for qemu-devel@nongnu.org; Wed, 18 Mar 2015 03:02:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YY80A-00032U-3U for qemu-devel@nongnu.org; Wed, 18 Mar 2015 03:02:54 -0400 Message-ID: <1426662159.32192.4.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Wed, 18 Mar 2015 08:02:39 +0100 In-Reply-To: <1426643370-15804-2-git-send-email-arei.gonglei@huawei.com> References: <1426643370-15804-1-git-send-email-arei.gonglei@huawei.com> <1426643370-15804-2-git-send-email-arei.gonglei@huawei.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 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: arei.gonglei@huawei.com Cc: qemu-stable , qemu-devel@nongnu.org, peter.huangpeng@huawei.com 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. I'll queue it up (and the other two too of course). cheers, Gerd