From patchwork Sat Jan 11 01:27:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 3468731 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5A8F49F169 for ; Sat, 11 Jan 2014 01:27:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7E40820142 for ; Sat, 11 Jan 2014 01:27:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8426C20127 for ; Sat, 11 Jan 2014 01:27:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751263AbaAKB1P (ORCPT ); Fri, 10 Jan 2014 20:27:15 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:43066 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750983AbaAKB1O (ORCPT ); Fri, 10 Jan 2014 20:27:14 -0500 Received: by mail-pd0-f170.google.com with SMTP id g10so5278798pdj.1 for ; Fri, 10 Jan 2014 17:27:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=subject:to:from:cc:date:message-id:in-reply-to:references :user-agent:mime-version:content-type:content-transfer-encoding; bh=Pz1TBN4mmoUJOeZRXuw4gMYy5oXbiYCJbi7ebFsDQf4=; b=aWaQHD9FHYXllvhszyVnBzcfkuIxisBBhraI7SguYAllcm1FvvQHHNxzKpc9RWdJTZ cq83BRA7gGWyq4BrEIgvrAnEN+B7OAg4QefDGJorgtXotjedjZCQ1ur+63N2dMDtCMRJ dGZA+zd99efLl5qmuyvP8qY+DWkKMZHsWLug3VCq4f8FvamIJKbyRyfINwVB8OQIEtop rs0BIOeXMMxguafTj0gHyZwH4MZZDY9LhsKXhzUYSC+R0KJjEjjpQec7Z0eHSiA19Q81 0joQp4sC0iL/SQPbbrKTeU2M9vI+7tV10ZNgsHLJbzwkapc86+R7C7PoUiPY0cYUwtPI Jsgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:from:cc:date:message-id:in-reply-to :references:user-agent:mime-version:content-type :content-transfer-encoding; bh=Pz1TBN4mmoUJOeZRXuw4gMYy5oXbiYCJbi7ebFsDQf4=; b=KgXMcuG0gRt4VmWh0TAKFJ0l2/Q0rBH53r5PZCFKS+NIj8g8aXkG/10Jlpcq0UbeNJ il5k0q9O1+NuxfdA7npoa0G0cQkw99pHZWsqp8j/LRWnB9uHuM7K+TX6X6X6KOxgjS1w tBPio+JT1ty25pasOYH2Z1VpnnT9lRYlH7nH7ztrM3Z7SXi9ZjxStVgT8z6CxSjRK21z 1hRAyCZSab8aU6U6Np+YbnPz4yIJ2Pf4JUzMUOwW6US+meLVVf2P86JoNO5TagNgZBqd ME48pTSoi+ZAQiBIy4ouTAEyjZupIbWP40PeS/xIaSVlf5j6Ei9lKfqbW2bS2ZGi35qN cB2w== X-Gm-Message-State: ALoCoQm9ZWEtY1VDKdeJ9tlRuU+HjUBRkw7ynRYCnaRZR9MYJ49idjb7QdHKWia3wm/vcKO8C0p7FBsYWt46J2gy8diieSGovwn+p903AylNemx5pokUXk7l4mSQCHjCmQha1Glt+na2YnIJh/tyDZ37xkkXFpNGSaNBDv+/xAKciy9N4JyStI6gMuwLO9ywRYyPVfXQ2Lyfpld7npKkUQslQw6x6VlNyQ== X-Received: by 10.69.1.104 with SMTP id bf8mr15201885pbd.75.1389403633753; Fri, 10 Jan 2014 17:27:13 -0800 (PST) Received: from localhost ([172.26.52.174]) by mx.google.com with ESMTPSA id si6sm26005442pab.19.2014.01.10.17.27.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 10 Jan 2014 17:27:13 -0800 (PST) Subject: [PATCH v2 04/12] PCI: Remove unused ID-Based Ordering support To: Stephen Hemminger , linux-pci@vger.kernel.org From: Bjorn Helgaas Cc: Yu Zhao , Jesse Barnes Date: Fri, 10 Jan 2014 18:27:11 -0700 Message-ID: <20140111012711.14505.25027.stgit@bhelgaas-glaptop.roam.corp.google.com> In-Reply-To: <20140111012339.14505.40203.stgit@bhelgaas-glaptop.roam.corp.google.com> References: <20140111012339.14505.40203.stgit@bhelgaas-glaptop.roam.corp.google.com> User-Agent: StGit/0.16 MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Stephen Hemminger My philosophy is unused code is dead code. And dead code is subject to bit rot and is a likely source of bugs. Use it or lose it. This reverts b48d4425b602 ("PCI: add ID-based ordering enable/disable support"), removing these interfaces: pci_enable_ido() pci_disable_ido() [bhelgaas: split to separate patch, also remove prototypes from pci.h] Signed-off-by: Stephen Hemminger Signed-off-by: Bjorn Helgaas CC: Jesse Barnes --- drivers/pci/pci.c | 40 ---------------------------------------- include/linux/pci.h | 13 ------------- 2 files changed, 53 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 84a24d16778f..6db2f1a441e9 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2110,46 +2110,6 @@ void pci_configure_ari(struct pci_dev *dev) } } -/** - * pci_enable_ido - enable ID-based Ordering on a device - * @dev: the PCI device - * @type: which types of IDO to enable - * - * Enable ID-based ordering on @dev. @type can contain the bits - * %PCI_EXP_IDO_REQUEST and/or %PCI_EXP_IDO_COMPLETION to indicate - * which types of transactions are allowed to be re-ordered. - */ -void pci_enable_ido(struct pci_dev *dev, unsigned long type) -{ - u16 ctrl = 0; - - if (type & PCI_EXP_IDO_REQUEST) - ctrl |= PCI_EXP_DEVCTL2_IDO_REQ_EN; - if (type & PCI_EXP_IDO_COMPLETION) - ctrl |= PCI_EXP_DEVCTL2_IDO_CMP_EN; - if (ctrl) - pcie_capability_set_word(dev, PCI_EXP_DEVCTL2, ctrl); -} -EXPORT_SYMBOL(pci_enable_ido); - -/** - * pci_disable_ido - disable ID-based ordering on a device - * @dev: the PCI device - * @type: which types of IDO to disable - */ -void pci_disable_ido(struct pci_dev *dev, unsigned long type) -{ - u16 ctrl = 0; - - if (type & PCI_EXP_IDO_REQUEST) - ctrl |= PCI_EXP_DEVCTL2_IDO_REQ_EN; - if (type & PCI_EXP_IDO_COMPLETION) - ctrl |= PCI_EXP_DEVCTL2_IDO_CMP_EN; - if (ctrl) - pcie_capability_clear_word(dev, PCI_EXP_DEVCTL2, ctrl); -} -EXPORT_SYMBOL(pci_disable_ido); - static int pci_acs_enable; /** diff --git a/include/linux/pci.h b/include/linux/pci.h index b8cbe52c7a48..f2284f1332db 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -997,11 +997,6 @@ static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, return __pci_enable_wake(dev, state, false, enable); } -#define PCI_EXP_IDO_REQUEST (1<<0) -#define PCI_EXP_IDO_COMPLETION (1<<1) -void pci_enable_ido(struct pci_dev *dev, unsigned long type); -void pci_disable_ido(struct pci_dev *dev, unsigned long type); - /* For use by arch with custom probe code */ void set_pcie_port_type(struct pci_dev *pdev); void set_pcie_hotplug_bridge(struct pci_dev *pdev); @@ -1412,14 +1407,6 @@ static inline int pci_enable_wake(struct pci_dev *dev, pci_power_t state, return 0; } -static inline void pci_enable_ido(struct pci_dev *dev, unsigned long type) -{ -} - -static inline void pci_disable_ido(struct pci_dev *dev, unsigned long type) -{ -} - static inline int pci_request_regions(struct pci_dev *dev, const char *res_name) { return -EIO;