From patchwork Thu Dec 2 22:54:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 74038 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1C273B6EE9 for ; Fri, 3 Dec 2010 10:08:20 +1100 (EST) Received: from localhost ([127.0.0.1]:44008 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POI5Q-00040T-Ht for incoming@patchwork.ozlabs.org; Thu, 02 Dec 2010 17:57:12 -0500 Received: from [140.186.70.92] (port=38534 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1POI3D-0003wt-Ba for qemu-devel@nongnu.org; Thu, 02 Dec 2010 17:54:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1POI3C-0001dy-Af for qemu-devel@nongnu.org; Thu, 02 Dec 2010 17:54:55 -0500 Received: from mx1.redhat.com ([209.132.183.28]:29742) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1POI3C-0001ds-46 for qemu-devel@nongnu.org; Thu, 02 Dec 2010 17:54:54 -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.13.8/8.13.8) with ESMTP id oB2MsrL0003850 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 2 Dec 2010 17:54:53 -0500 Received: from redhat.com (vpn-200-18.tlv.redhat.com [10.35.200.18]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id oB2MspHO001622; Thu, 2 Dec 2010 17:54:51 -0500 Date: Fri, 3 Dec 2010 00:54:37 +0200 From: "Michael S. Tsirkin" To: yamahata@valinux.co.jp, qemu-devel@nongnu.org Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Mutt-Fcc: =sent User-Agent: Mutt/1.5.21 (2010-09-15) X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Subject: [Qemu-devel] [PATCH 3/6] pci/aer: remove dead code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Remove some unused variables and return values. Signed-off-by: Michael S. Tsirkin --- hw/pcie_aer.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-) diff --git a/hw/pcie_aer.c b/hw/pcie_aer.c index 18bbd5a..204155b 100644 --- a/hw/pcie_aer.c +++ b/hw/pcie_aer.c @@ -258,29 +258,21 @@ static unsigned int pcie_aer_root_get_vector(PCIDevice *dev) } /* - * return value: - * true: error message is sent up - * false: error message is masked - * * 6.2.6 Error Message Control * Figure 6-3 * root port part */ -static bool pcie_aer_msg_root_port(PCIDevice *dev, const PCIEAERMsg *msg) +static void pcie_aer_msg_root_port(PCIDevice *dev, const PCIEAERMsg *msg) { - bool msg_sent; uint16_t cmd; uint8_t *aer_cap; uint32_t root_cmd; uint32_t root_status; - bool msi_trigger; - msg_sent = false; cmd = pci_get_word(dev->config + PCI_COMMAND); aer_cap = dev->config + dev->exp.aer_cap; root_cmd = pci_get_long(aer_cap + PCI_ERR_ROOT_COMMAND); root_status = pci_get_long(aer_cap + PCI_ERR_ROOT_STATUS); - msi_trigger = false; if (cmd & PCI_COMMAND_SERR) { /* System Error. @@ -300,7 +292,6 @@ static bool pcie_aer_msg_root_port(PCIDevice *dev, const PCIEAERMsg *msg) root_status |= PCI_ERR_ROOT_MULTI_COR_RCV; } else { if (root_cmd & PCI_ERR_ROOT_CMD_COR_EN) { - msi_trigger = true; } pci_set_word(aer_cap + PCI_ERR_ROOT_COR_SRC, msg->source_id); } @@ -309,14 +300,12 @@ static bool pcie_aer_msg_root_port(PCIDevice *dev, const PCIEAERMsg *msg) case PCI_ERR_ROOT_CMD_NONFATAL_EN: if (!(root_status & PCI_ERR_ROOT_NONFATAL_RCV) && root_cmd & PCI_ERR_ROOT_CMD_NONFATAL_EN) { - msi_trigger = true; } root_status |= PCI_ERR_ROOT_NONFATAL_RCV; break; case PCI_ERR_ROOT_CMD_FATAL_EN: if (!(root_status & PCI_ERR_ROOT_FATAL_RCV) && root_cmd & PCI_ERR_ROOT_CMD_FATAL_EN) { - msi_trigger = true; } if (!(root_status & PCI_ERR_ROOT_UNCOR_RCV)) { root_status |= PCI_ERR_ROOT_FIRST_FATAL; @@ -346,9 +335,7 @@ static bool pcie_aer_msg_root_port(PCIDevice *dev, const PCIEAERMsg *msg) } else { qemu_set_irq(dev->irq[dev->exp.aer_intx], 1); } - msg_sent = true; } - return msg_sent; } /*