From patchwork Tue Mar 6 23:15:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: BALATON Zoltan X-Patchwork-Id: 10263105 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A696E60211 for ; Tue, 6 Mar 2018 23:29:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9BDFB291F0 for ; Tue, 6 Mar 2018 23:29:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 90B9929223; Tue, 6 Mar 2018 23:29:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 86C5C291F0 for ; Tue, 6 Mar 2018 23:29:49 +0000 (UTC) Received: from localhost ([::1]:58874 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etM1k-0004Iq-2G for patchwork-qemu-devel@patchwork.kernel.org; Tue, 06 Mar 2018 18:29:48 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42075) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etM14-0003rm-3a for qemu-devel@nongnu.org; Tue, 06 Mar 2018 18:29:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etM10-0007n4-4k for qemu-devel@nongnu.org; Tue, 06 Mar 2018 18:29:06 -0500 Received: from zero.eik.bme.hu ([152.66.115.2]:55054) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1etM0z-0007ke-Tx; Tue, 06 Mar 2018 18:29:02 -0500 Received: from zero.eik.bme.hu (blah.eik.bme.hu [152.66.115.182]) by localhost (Postfix) with SMTP id 346427456C6; Wed, 7 Mar 2018 00:28:52 +0100 (CET) Received: by zero.eik.bme.hu (Postfix, from userid 432) id 8DD617456A5; Wed, 7 Mar 2018 00:28:51 +0100 (CET) From: BALATON Zoltan Date: Wed, 7 Mar 2018 00:15:15 +0100 To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Message-Id: <20180306232851.8DD617456A5@zero.eik.bme.hu> X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 152.66.115.2 Subject: [Qemu-devel] [PATCH] sii3112: Remove unneeded exit function X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Thomas Huth , John Snow , David Gibson Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP An exit function was mistakenly left here but it's not needed because the PCI bars are organised differently in this device. Calling this exit function during device_del was causing an abort with memory_region_del_subregion: `Assertion subregion->container == mr' failed. Reported-by: Thomas Huth Signed-off-by: BALATON Zoltan --- hw/ide/sii3112.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index e3896c6..743a50e 100644 --- a/hw/ide/sii3112.c +++ b/hw/ide/sii3112.c @@ -327,17 +327,6 @@ static void sii3112_pci_realize(PCIDevice *dev, Error **errp) qemu_register_reset(sii3112_reset, s); } -static void sii3112_pci_exitfn(PCIDevice *dev) -{ - PCIIDEState *d = PCI_IDE(dev); - int i; - - for (i = 0; i < 2; ++i) { - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].extra_io); - memory_region_del_subregion(&d->bmdma_bar, &d->bmdma[i].addr_ioport); - } -} - static void sii3112_pci_class_init(ObjectClass *klass, void *data) { DeviceClass *dc = DEVICE_CLASS(klass); @@ -348,7 +337,6 @@ static void sii3112_pci_class_init(ObjectClass *klass, void *data) pd->class_id = PCI_CLASS_STORAGE_RAID; pd->revision = 1; pd->realize = sii3112_pci_realize; - pd->exit = sii3112_pci_exitfn; dc->desc = "SiI3112A SATA controller"; set_bit(DEVICE_CATEGORY_STORAGE, dc->categories); }