From patchwork Mon Jul 2 22:58:54 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 10502683 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DDA5B60532 for ; Mon, 2 Jul 2018 23:09:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CBC2728C3B for ; Mon, 2 Jul 2018 23:09:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BD49528C3D; Mon, 2 Jul 2018 23:09:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5514628C3B for ; Mon, 2 Jul 2018 23:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Y9Noeq9Op4cpE5WOe9XclsNx/DeHrvHZQkrxlcvjsVQ=; b=YdpTqmamRDX2TV 5cey11iqhStjH7JjbHIt2rcLICdeh1kgwrlyb9CoJhUrxTEJFhk2fgQD51AqvmC3/w7SngyOoV0Fz dgEyWTPsF4vNYm37gowRuQPTUg3cNNikzjvIjnDXZDf8C9nKmCC50ISjMuFFulo7uNDPykuFZ3bO8 xW6IxuTcCmWD5djSMiW8dXrtF1ducqjmzZCsgtaUc7A1FiaG1rp2ygtjBj1HHewtIEVe3CqqaXu6l Xe91WxtTpes9hH22yxA2361N/vt1RIp5WC0nwDt/5/wTGQXFBy1GnHf1h+rLQiECOEIRHX+SIBoQ3 dxAxhjufC/BERQtIvapw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fa7wq-000456-GK; Mon, 02 Jul 2018 23:09:32 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fa7wo-0003wV-Mq for linux-arm-kernel@bombadil.infradead.org; Mon, 02 Jul 2018 23:09:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=oVuTq9XyfRWCOog8kcI/qGVrxdSOYvLCIqf7ab4vQDs=; b=ZPUwyeiumZzbUmRvRpKqFXdRHT qUSo8m1N5pRD3dht7weaT/WRCIJ28lyzaeD1QDXET/3zirG7LxFfynaQ8FHjoGXiGPBwAT00QSSki RgDC14sbLk5kt+bkSD292sKBFYkfV+DUIAXdoZzlajdwjq7PgR8iji+KOBvqZugw5XYSG6MYaOMAh 0X+e2s9hv11srCred+0h5Gjetsp4p4Ndf25l8B+zEbgGPv1bRehgIgBuCuYxSJv/iP1YImXmei8zV EQwyIBcLonjFHnDTpxLUxSuROgZlKrdPRoDK3wnBQJu9eFxtR/n+KDcZ1NHBKYXtn/Cz6lo5Ilq9M sne9njlg==; Received: from smtp.codeaurora.org ([198.145.29.96]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fa7nU-0007Bb-65 for linux-arm-kernel@lists.infradead.org; Mon, 02 Jul 2018 22:59:54 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 90C38607EB; Mon, 2 Jul 2018 22:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530572377; bh=/CwhFzxLYmmAaaQaeolNwwjV9InhM14JUwx93HfdBLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EdLwoRZq6PlkpPll+tfcb/zZJ/HSdXj/zRSFtYJPbUcrfD4uCW7IXnXz48LR+RD19 9UV2JNIz/5scz/L1h2DR2cEFMkNKrkTjA8eJ5vn9vebf4B+XwWfpRXSHe4EPbucTVB uOcrZkgXyng2hr38izGA0+oE5WUSLGy+pKoIuNHU= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 55D4360B26; Mon, 2 Jul 2018 22:59:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530572377; bh=/CwhFzxLYmmAaaQaeolNwwjV9InhM14JUwx93HfdBLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EdLwoRZq6PlkpPll+tfcb/zZJ/HSdXj/zRSFtYJPbUcrfD4uCW7IXnXz48LR+RD19 9UV2JNIz/5scz/L1h2DR2cEFMkNKrkTjA8eJ5vn9vebf4B+XwWfpRXSHe4EPbucTVB uOcrZkgXyng2hr38izGA0+oE5WUSLGy+pKoIuNHU= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 55D4360B26 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=okaya@codeaurora.org From: Sinan Kaya To: linux-pci@vger.kernel.org Subject: [PATCH V5 5/6] PCI: Deprecate pci_reset_bus() and pci_reset_slot() functions Date: Mon, 2 Jul 2018 18:58:54 -0400 Message-Id: <1530572336-20296-6-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530572336-20296-1-git-send-email-okaya@codeaurora.org> References: <1530572336-20296-1-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180702_235952_690278_D9AAE72E X-CRM114-Status: GOOD ( 14.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sinan Kaya , linux-arm-msm@vger.kernel.org, Bjorn Helgaas , open list , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP pci_reset_bus() and pci_reset_slot() functions are not being used by any code. Remove them from the kernel in favor of pci_try_reset_bus() and pci_try_reset_slot() functions. Signed-off-by: Sinan Kaya --- drivers/pci/pci.c | 55 ++--------------------------------------------------- include/linux/pci.h | 2 -- 2 files changed, 2 insertions(+), 55 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index a31e6db..7e3f2e9 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4784,9 +4784,9 @@ int pci_probe_reset_slot(struct pci_slot *slot) EXPORT_SYMBOL_GPL(pci_probe_reset_slot); /** - * pci_reset_slot - reset a PCI slot + * __pci_try_reset_slot - Try to reset a PCI slot * @slot: PCI slot to reset - * + *` * A PCI bus may host multiple slots, each slot may support a reset mechanism * independent of other slots. For instance, some slots may support slot power * control. In the case of a 1:1 bus to slot architecture, this function may @@ -4796,30 +4796,6 @@ EXPORT_SYMBOL_GPL(pci_probe_reset_slot); * through this function. PCI config space of all devices in the slot and * behind the slot is saved before and restored after reset. * - * Return 0 on success, non-zero on error. - */ -int pci_reset_slot(struct pci_slot *slot) -{ - int rc; - - rc = pci_slot_reset(slot, 1); - if (rc) - return rc; - - pci_slot_save_and_disable(slot); - - rc = pci_slot_reset(slot, 0); - - pci_slot_restore(slot); - - return rc; -} -EXPORT_SYMBOL_GPL(pci_reset_slot); - -/** - * __pci_try_reset_slot - Try to reset a PCI slot - * @slot: PCI slot to reset - * * Same as above except return -EAGAIN if the slot cannot be locked */ static int __pci_try_reset_slot(struct pci_slot *slot) @@ -4878,33 +4854,6 @@ int pci_probe_reset_bus(struct pci_bus *bus) EXPORT_SYMBOL_GPL(pci_probe_reset_bus); /** - * pci_reset_bus - reset a PCI bus - * @bus: top level PCI bus to reset - * - * Do a bus reset on the given bus and any subordinate buses, saving - * and restoring state of all devices. - * - * Return 0 on success, non-zero on error. - */ -int pci_reset_bus(struct pci_bus *bus) -{ - int rc; - - rc = pci_bus_reset(bus, 1); - if (rc) - return rc; - - pci_bus_save_and_disable(bus); - - rc = pci_bus_reset(bus, 0); - - pci_bus_restore(bus); - - return rc; -} -EXPORT_SYMBOL_GPL(pci_reset_bus); - -/** * __pci_try_reset_bus - Try to reset a PCI bus * @bus: top level PCI bus to reset * diff --git a/include/linux/pci.h b/include/linux/pci.h index f5c85b6..ad0c89a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1095,9 +1095,7 @@ int pci_reset_function(struct pci_dev *dev); int pci_reset_function_locked(struct pci_dev *dev); int pci_try_reset_function(struct pci_dev *dev); int pci_probe_reset_slot(struct pci_slot *slot); -int pci_reset_slot(struct pci_slot *slot); int pci_probe_reset_bus(struct pci_bus *bus); -int pci_reset_bus(struct pci_bus *bus); int pci_try_reset_bus(struct pci_dev *dev); void pci_reset_secondary_bus(struct pci_dev *dev); void pcibios_reset_secondary_bus(struct pci_dev *dev);