From nobody Mon Feb 9 14:03:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1492554113547798.3286962270818; Tue, 18 Apr 2017 15:21:53 -0700 (PDT) Received: from localhost ([::1]:44883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0bVQ-0003c3-7A for importer@patchew.org; Tue, 18 Apr 2017 18:21:52 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0bRd-0000oF-UD for qemu-devel@nongnu.org; Tue, 18 Apr 2017 18:17:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0bRc-0002XH-Lg for qemu-devel@nongnu.org; Tue, 18 Apr 2017 18:17:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49584) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d0bRc-0002Ww-Cb; Tue, 18 Apr 2017 18:17:56 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5BA6F787E9; Tue, 18 Apr 2017 22:17:55 +0000 (UTC) Received: from localhost (ovpn-116-28.gru2.redhat.com [10.97.116.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 02BB0784BA; Tue, 18 Apr 2017 22:17:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 5BA6F787E9 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=ehabkost@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 5BA6F787E9 From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Tue, 18 Apr 2017 19:17:22 -0300 Message-Id: <20170418221724.5707-5-ehabkost@redhat.com> In-Reply-To: <20170418221724.5707-1-ehabkost@redhat.com> References: <20170418221724.5707-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 18 Apr 2017 22:17:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [RFC v2 4/6] pci: Manually simplify QOM casts at pci_host_bus_init*() calls 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: "Michael S. Tsirkin" , aik@ozlabs.ru, Alexander Graf , qemu-ppc@nongnu.org, Marcel Apfelbaum , David Gibson , Laszlo Ersek , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Those redundant casts were not detected by the Coccinelle patch because there are multiple variables and casts involved. Fix them manually. Cc: "Michael S. Tsirkin" Cc: Alexander Graf Cc: David Gibson Cc: Aurelien Jarno Cc: qemu-ppc@nongnu.org Signed-off-by: Eduardo Habkost Reviewed-by: David Gibson --- hw/pci-host/q35.c | 2 +- hw/pci-host/uninorth.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/sh4/sh_pci.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pci-host/q35.c b/hw/pci-host/q35.c index 947dc3f124..4258076979 100644 --- a/hw/pci-host/q35.c +++ b/hw/pci-host/q35.c @@ -49,7 +49,7 @@ static void q35_host_realize(DeviceState *dev, Error **er= rp) sysbus_add_io(sbd, MCH_HOST_BRIDGE_CONFIG_DATA, &pci->data_mem); sysbus_init_ioports(sbd, MCH_HOST_BRIDGE_CONFIG_DATA, 4); =20 - pci->bus =3D pci_host_bus_init(PCI_HOST_BRIDGE(s), "pcie.0", + pci->bus =3D pci_host_bus_init(pci, "pcie.0", s->mch.pci_address_space, s->mch.address_space_io, 0, TYPE_PCIE_BUS= ); PC_MACHINE(qdev_get_machine())->bus =3D pci->bus; diff --git a/hw/pci-host/uninorth.c b/hw/pci-host/uninorth.c index 079faad6ff..d9fb5fdc93 100644 --- a/hw/pci-host/uninorth.c +++ b/hw/pci-host/uninorth.c @@ -233,7 +233,7 @@ PCIBus *pci_pmac_init(qemu_irq *pic, memory_region_add_subregion(address_space_mem, 0x80000000ULL, &d->pci_hole); =20 - h->bus =3D pci_host_bus_init_irqs(PCI_HOST_BRIDGE(dev), NULL, + h->bus =3D pci_host_bus_init_irqs(h, NULL, pci_unin_set_irq, pci_unin_map_irq, pi= c, &d->pci_mmio, address_space_io, PCI_DEVFN(11, 0), 4, TYPE_PCI_BUS); diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c index 7f29cc77b0..ce132c5eea 100644 --- a/hw/ppc/spapr_pci.c +++ b/hw/ppc/spapr_pci.c @@ -1697,7 +1697,7 @@ static void spapr_phb_realize(DeviceState *dev, Error= **errp) memory_region_add_subregion(get_system_memory(), sphb->io_win_addr, &sphb->iowindow); =20 - bus =3D pci_host_bus_init_irqs(PCI_HOST_BRIDGE(dev), NULL, + bus =3D pci_host_bus_init_irqs(phb, NULL, pci_spapr_set_irq, pci_spapr_map_irq, sph= b, &sphb->memspace, &sphb->iospace, PCI_DEVFN(0, 0), PCI_NUM_PINS, TYPE_PCI_B= US); diff --git a/hw/sh4/sh_pci.c b/hw/sh4/sh_pci.c index f589b1628e..8be2e830e9 100644 --- a/hw/sh4/sh_pci.c +++ b/hw/sh4/sh_pci.c @@ -131,7 +131,7 @@ static int sh_pci_device_init(SysBusDevice *dev) for (i =3D 0; i < 4; i++) { sysbus_init_irq(dev, &s->irq[i]); } - phb->bus =3D pci_host_bus_init_irqs(PCI_HOST_BRIDGE(dev), "pci", + phb->bus =3D pci_host_bus_init_irqs(phb, "pci", sh_pci_set_irq, sh_pci_map_irq, s->i= rq, get_system_memory(), get_system_io(), PCI_DEVFN(0, 0), 4, TYPE_PCI_BUS); --=20 2.11.0.259.g40922b1