From patchwork Thu Mar 7 23:17:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Williamson X-Patchwork-Id: 226000 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 36C252C0385 for ; Fri, 8 Mar 2013 10:26:14 +1100 (EST) Received: from localhost ([::1]:41899 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDkCS-0005DG-4i for incoming@patchwork.ozlabs.org; Thu, 07 Mar 2013 18:26:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:45496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDkCE-0005D0-Kf for qemu-devel@nongnu.org; Thu, 07 Mar 2013 18:25:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDkCC-0007lk-C5 for qemu-devel@nongnu.org; Thu, 07 Mar 2013 18:25:58 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63308) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDk3Z-0005Kb-Ur for qemu-devel@nongnu.org; Thu, 07 Mar 2013 18:17:02 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r27NH1KB008584 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 7 Mar 2013 18:17:01 -0500 Received: from bling.home (ovpn-113-45.phx2.redhat.com [10.3.113.45]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r27NH0uh018214; Thu, 7 Mar 2013 18:17:01 -0500 To: mst@redhat.com From: Alex Williamson Date: Thu, 07 Mar 2013 16:17:00 -0700 Message-ID: <20130307231700.31144.13726.stgit@bling.home> In-Reply-To: <20130307230844.31144.93342.stgit@bling.home> References: <20130307230844.31144.93342.stgit@bling.home> User-Agent: StGit/0.16 MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 2/2] pci_bridge: Remove duplicate IRQ swizzle function 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 pci_bridge_dev_map_irq_fn() is identical to pci_swizzle_map_irq_fn(), which is now the default for all PCI bridges. We can therefore remove this function and the pci_bridge_map_irq() call that used it. Signed-off-by: Alex Williamson --- hw/pci_bridge_dev.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/hw/pci_bridge_dev.c b/hw/pci_bridge_dev.c index 1124c53..710f688 100644 --- a/hw/pci_bridge_dev.c +++ b/hw/pci_bridge_dev.c @@ -36,21 +36,12 @@ struct PCIBridgeDev { }; typedef struct PCIBridgeDev PCIBridgeDev; -/* Mapping mandated by PCI-to-PCI Bridge architecture specification, - * revision 1.2 */ -/* Table 9-1: Interrupt Binding for Devices Behind a Bridge */ -static int pci_bridge_dev_map_irq_fn(PCIDevice *dev, int irq_num) -{ - return (irq_num + PCI_SLOT(dev->devfn)) % PCI_NUM_PINS; -} - static int pci_bridge_dev_initfn(PCIDevice *dev) { PCIBridge *br = DO_UPCAST(PCIBridge, dev, dev); PCIBridgeDev *bridge_dev = DO_UPCAST(PCIBridgeDev, bridge, br); int err; - pci_bridge_map_irq(br, NULL, pci_bridge_dev_map_irq_fn); err = pci_bridge_initfn(dev); if (err) { goto bridge_error;