From patchwork Sun Sep 14 19:38:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 389118 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 97842140096 for ; Mon, 15 Sep 2014 05:39:29 +1000 (EST) Received: from localhost ([::1]:55953 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTFdv-0008Bx-Na for incoming@patchwork.ozlabs.org; Sun, 14 Sep 2014 15:39:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTFdO-000779-Bn for qemu-devel@nongnu.org; Sun, 14 Sep 2014 15:38:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XTFdJ-0002pE-IR for qemu-devel@nongnu.org; Sun, 14 Sep 2014 15:38:54 -0400 Received: from mnementh.archaic.org.uk ([81.2.115.146]:47005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XTFdJ-0002oz-36; Sun, 14 Sep 2014 15:38:49 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1XTFdH-0004fD-Cm; Sun, 14 Sep 2014 20:38:47 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Sun, 14 Sep 2014 20:38:47 +0100 Message-Id: <1410723527-17902-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 81.2.115.146 Cc: qemu-ppc@nongnu.org, Alexander Graf , patches@linaro.org Subject: [Qemu-devel] [PATCH] hw/pci/ppc4xx_pci.c: Remove unused pci4xx_cfgaddr_read/write/ops 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 The MemoryRegionOps struct pci4xx_cfgaddr_ops and the read and write functions it references are all unused; remove them. Signed-off-by: Peter Maydell --- This is rather applying a blunt instrument to the code -- maybe the ops should be used for something instead? (cf the comment about splitting memory regions in ppc4xx_pcihost_initfn()...) hw/ppc/ppc4xx_pci.c | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/hw/ppc/ppc4xx_pci.c b/hw/ppc/ppc4xx_pci.c index 55a3cab..0bb3cdb 100644 --- a/hw/ppc/ppc4xx_pci.c +++ b/hw/ppc/ppc4xx_pci.c @@ -92,30 +92,6 @@ typedef struct PPC4xxPCIState PPC4xxPCIState; #define PCI_ALL_SIZE (PCI_REG_BASE + PCI_REG_SIZE) -static uint64_t pci4xx_cfgaddr_read(void *opaque, hwaddr addr, - unsigned size) -{ - PPC4xxPCIState *ppc4xx_pci = opaque; - PCIHostState *phb = PCI_HOST_BRIDGE(ppc4xx_pci); - - return phb->config_reg; -} - -static void pci4xx_cfgaddr_write(void *opaque, hwaddr addr, - uint64_t value, unsigned size) -{ - PPC4xxPCIState *ppc4xx_pci = opaque; - PCIHostState *phb = PCI_HOST_BRIDGE(ppc4xx_pci); - - phb->config_reg = value & ~0x3; -} - -static const MemoryRegionOps pci4xx_cfgaddr_ops = { - .read = pci4xx_cfgaddr_read, - .write = pci4xx_cfgaddr_write, - .endianness = DEVICE_LITTLE_ENDIAN, -}; - static void ppc4xx_pci_reg_write4(void *opaque, hwaddr offset, uint64_t value, unsigned size) {