Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp252217imm; Thu, 28 Jun 2018 19:22:58 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd6dtfkfBnEVaB8M7w48Lz/Pj2NMdTdN/LQeI7Q9p8y8bV1TuivX/9TXeQH2jLnMsMdym3f X-Received: by 2002:a65:5a49:: with SMTP id z9-v6mr1473123pgs.244.1530238978506; Thu, 28 Jun 2018 19:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530238978; cv=none; d=google.com; s=arc-20160816; b=CvLbUfKAoatpeSSGTycVnmFX1LNu1Z7+J7JRA6t6Pqz+rEogu6o2biPGGpwTHAk/o+ i2nOOI4fIOeotKhRZe8NUyKEZsXYfkyjwncxxbaZtdoFKYLbetF62HOFrTS0L71R0nrz BJvWWWxTEduJzhkWsTPznKwwcJf/rf4F4KzRNKP0h6h+DlrJeyk/ESyrxKSxsuJkI6aY /ZySj1FujXko214MPNWR7FRKYbW725o/qwklTrHBwweCHSOpSMBXnIupqzQN3f3ysG3P 9dbJkS4uUcJyZeXRtvGkc7yQxOZFO03NWaX4M1/629dsoaQkDbxI4/usaNj1fQMQdiOk gP7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=oXyc1YIdkWobhivtyGLQuav3mHJirb7GQkNT3//mmcY=; b=Zkmaxh6UDW1iahkNuQQwzL/4nqWpOpkSrGdLE4FVsWo5XpUlQfPwJJh0aTqA4yBnQG KY2Ur56HJJ99Bs4mjkxsXZVrnFlLd7LtQcOMjrs6FRjPjwk1Q6BffTJTUGEk9fLsFhdC bS6Nhc+XpJOPufrzHhTJRtI5wIiojgGw5B3RKEUhmz4rpvXNE7Mz56QzkTN/uj3SrjI2 2llV6YbmqS8Ca4Ix0q5DJcgZv048ubMu5SlyhxkRcQC2DwoEhz+9oQuK6H9O2H839ySD T38bSeb7r4Lqq3JOV6Hghk7oZJSBWajDwXs1hHadZSiUjxqvdPfMYu5xuQUsIHMBIueB GaZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=PTPAsdY7; dkim=pass header.i=@codeaurora.org header.s=default header.b=odqHzjk2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w185-v6si6850278pgb.599.2018.06.28.19.22.44; Thu, 28 Jun 2018 19:22:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=PTPAsdY7; dkim=pass header.i=@codeaurora.org header.s=default header.b=odqHzjk2; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967917AbeF1SaN (ORCPT + 99 others); Thu, 28 Jun 2018 14:30:13 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:35878 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966496AbeF1SaJ (ORCPT ); Thu, 28 Jun 2018 14:30:09 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C7CAC60CA2; Thu, 28 Jun 2018 18:29:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530210609; bh=yzowvntBUDaV3G8x809xkVFE3DgfPOtCfmXvwSKbs14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PTPAsdY7nrebe+F4gyCswHa9mg/eMwONlUjUZ4tl1Ub6F2i+PfX/qTO1jirZ14LWp Y4lU/rAojSjeAhyC8oYR43zNRivnEAsuWPEplLqPB2UDSFKurYKKDAm1TEictyvQ3m YFLky8coEEKkzCn4Q7fngitAewrUR4yeKdghNahM= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 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 81F8460C6C; Thu, 28 Jun 2018 18:29:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1530210586; bh=yzowvntBUDaV3G8x809xkVFE3DgfPOtCfmXvwSKbs14=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=odqHzjk2pL8FUWcU7JrS/Rmn4g4cA95R7e0kyA0Fa4db54ZgC2tCGUkE7LIFQj+OH AMFs4pSAPvipErvpQeYR4zd34nKyqxoZt4/uFPHayrD9yvdkIFA75oEs8PWo5U/sWK rWlNbjrS6KeqDLREjauy9d9Qx67Iwinvj4QnmPaI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 81F8460C6C 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 Cc: linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sinan Kaya , Bjorn Helgaas , linux-kernel@vger.kernel.org (open list) Subject: [PATCH V3 4/6] PCI: Deprecate pci_reset_bus() and pci_reset_slot() functions Date: Thu, 28 Jun 2018 14:28:24 -0400 Message-Id: <1530210507-9287-4-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1530210507-9287-1-git-send-email-okaya@codeaurora.org> References: <1530210507-9287-1-git-send-email-okaya@codeaurora.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 79a1566..6cec722 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); -- 2.7.4