From patchwork Wed Aug 15 09:58:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 177603 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 07A612C00AB for ; Wed, 15 Aug 2012 19:59:33 +1000 (EST) Received: from localhost ([::1]:35673 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1aNv-0001UB-5e for incoming@patchwork.ozlabs.org; Wed, 15 Aug 2012 05:59:31 -0400 Received: from eggs.gnu.org ([208.118.235.92]:34949) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1aNX-00018Y-Lv for qemu-devel@nongnu.org; Wed, 15 Aug 2012 05:59:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T1aNW-0006sr-GU for qemu-devel@nongnu.org; Wed, 15 Aug 2012 05:59:07 -0400 Received: from cantor2.suse.de ([195.135.220.15]:38691 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T1aNW-0006sk-AS; Wed, 15 Aug 2012 05:59:06 -0400 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 9D29DA3D8B; Wed, 15 Aug 2012 11:59:05 +0200 (CEST) From: Alexander Graf To: qemu-ppc Mailing List Date: Wed, 15 Aug 2012 11:58:39 +0200 Message-Id: <1345024742-18394-2-git-send-email-agraf@suse.de> X-Mailer: git-send-email 1.6.0.2 In-Reply-To: <1345024742-18394-1-git-send-email-agraf@suse.de> References: <1345024742-18394-1-git-send-email-agraf@suse.de> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 195.135.220.15 Cc: Blue Swirl , Alexey Kardashevskiy , qemu-devel qemu-devel , Aurelien Jarno Subject: [Qemu-devel] [PATCH 01/24] pseries pci: removed redundant busdev X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Alexey Kardashevskiy The PCIHostState struct already contains SysBusDevice so the one in sPAPRPHBState has to go. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Alexander Graf --- hw/spapr_pci.c | 4 ++-- hw/spapr_pci.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/spapr_pci.c b/hw/spapr_pci.c index b2e4f78..5bee180 100644 --- a/hw/spapr_pci.c +++ b/hw/spapr_pci.c @@ -276,7 +276,7 @@ static DMAContext *spapr_pci_dma_context_fn(PCIBus *bus, void *opaque, static int spapr_phb_init(SysBusDevice *s) { - sPAPRPHBState *phb = FROM_SYSBUS(sPAPRPHBState, s); + sPAPRPHBState *phb = DO_UPCAST(sPAPRPHBState, host_state.busdev, s); char *namebuf; int i; PCIBus *bus; @@ -314,7 +314,7 @@ static int spapr_phb_init(SysBusDevice *s) memory_region_add_subregion(get_system_memory(), phb->io_win_addr, &phb->iowindow); - bus = pci_register_bus(&phb->busdev.qdev, + bus = pci_register_bus(&phb->host_state.busdev.qdev, phb->busname ? phb->busname : phb->dtbusname, pci_spapr_set_irq, pci_spapr_map_irq, phb, &phb->memspace, &phb->iospace, diff --git a/hw/spapr_pci.h b/hw/spapr_pci.h index d9e46e2..a141764 100644 --- a/hw/spapr_pci.h +++ b/hw/spapr_pci.h @@ -28,7 +28,6 @@ #include "hw/xics.h" typedef struct sPAPRPHBState { - SysBusDevice busdev; PCIHostState host_state; uint64_t buid;