From patchwork Tue Sep 5 23:21:23 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Jan_H=2E_Sch=C3=B6nherr?= X-Patchwork-Id: 810316 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-pci-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amazon.de header.i=@amazon.de header.b="fUCYqyVU"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xn2ml1rLJz9s7C for ; Wed, 6 Sep 2017 09:22:15 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752849AbdIEXWN (ORCPT ); Tue, 5 Sep 2017 19:22:13 -0400 Received: from smtp-fw-6002.amazon.com ([52.95.49.90]:50723 "EHLO smtp-fw-6002.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752664AbdIEXWM (ORCPT ); Tue, 5 Sep 2017 19:22:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1504653732; x=1536189732; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8R+7bNT+ZKlkrv+f5f0fMLcUccE6IJRnywrzk+6Uz9g=; b=fUCYqyVU2OSaGPD43Eij1PTfrG4fn9XD0Ua5jZ6eFjT/hRDDYxRNa31n e2mIPIsIu21pXCIpSQaFua5XNy10BL7337Wmm8NIjOWTwwaC6T6zYMS2O Y9GDhq6tkeAZTGAqDJtoWqwRjXsFWTV+lpIfq5YuVLQIx7Uk00py9Ocot Y=; X-IronPort-AV: E=Sophos;i="5.41,481,1498521600"; d="scan'208";a="303737485" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6002.iad6.amazon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 05 Sep 2017 23:22:04 +0000 Received: from u28d244cd5724546b2f74.ant.amazon.com (iad7-ws-svc-lb50-vlan2.amazon.com [10.0.93.210]) by email-inbound-relay-1a-e34f1ddc.us-east-1.amazon.com (8.14.7/8.14.7) with ESMTP id v85NLvLK042639 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 5 Sep 2017 23:21:59 GMT Received: from u28d244cd5724546b2f74.ant.amazon.com (localhost [127.0.0.1]) by u28d244cd5724546b2f74.ant.amazon.com (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id v85NLuDQ011664; Wed, 6 Sep 2017 01:21:56 +0200 Received: (from jschoenh@localhost) by u28d244cd5724546b2f74.ant.amazon.com (8.14.4/8.14.4/Submit) id v85NLrEK011658; Wed, 6 Sep 2017 01:21:53 +0200 From: =?utf-8?q?Jan_H=2E_Sch=C3=B6nherr?= To: Bjorn Helgaas Cc: =?utf-8?q?Jan_H=2E_Sch=C3=B6nherr?= , linux-pci@vger.kernel.org, Russell Currey , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 2/2] PCI: Remove unused function __pci_reset_function() Date: Wed, 6 Sep 2017 01:21:23 +0200 Message-Id: <1504653683-11543-2-git-send-email-jschoenh@amazon.de> X-Mailer: git-send-email 2.3.1.dirty In-Reply-To: <1504653683-11543-1-git-send-email-jschoenh@amazon.de> References: <1504653683-11543-1-git-send-email-jschoenh@amazon.de> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org The last caller of __pci_reset_function() has been removed. Remove the function as well. Signed-off-by: Jan H. Schönherr --- drivers/pci/pci.c | 35 +++-------------------------------- include/linux/pci.h | 1 - 2 files changed, 3 insertions(+), 33 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index fdf65a6..dabcf5a 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -4115,35 +4115,6 @@ static void pci_dev_restore(struct pci_dev *dev) } /** - * __pci_reset_function - reset a PCI device function - * @dev: PCI device to reset - * - * Some devices allow an individual function to be reset without affecting - * other functions in the same device. The PCI device must be responsive - * to PCI config space in order to use this function. - * - * The device function is presumed to be unused when this function is called. - * Resetting the device will make the contents of PCI configuration space - * random, so any caller of this must be prepared to reinitialise the - * device including MSI, bus mastering, BARs, decoding IO and memory spaces, - * etc. - * - * Returns 0 if the device function was successfully reset or negative if the - * device doesn't support resetting a single function. - */ -int __pci_reset_function(struct pci_dev *dev) -{ - int ret; - - pci_dev_lock(dev); - ret = __pci_reset_function_locked(dev); - pci_dev_unlock(dev); - - return ret; -} -EXPORT_SYMBOL_GPL(__pci_reset_function); - -/** * __pci_reset_function_locked - reset a PCI device function while holding * the @dev mutex lock. * @dev: PCI device to reset @@ -4233,8 +4204,8 @@ int pci_probe_reset_function(struct pci_dev *dev) * * This function does not just reset the PCI portion of a device, but * clears all the state associated with the device. This function differs - * from __pci_reset_function in that it saves and restores device state - * over the reset. + * from __pci_reset_function_locked() in that it saves and restores device state + * over the reset and takes the PCI device lock. * * Returns 0 if the device function was successfully reset or negative if the * device doesn't support resetting a single function. @@ -4269,7 +4240,7 @@ EXPORT_SYMBOL_GPL(pci_reset_function); * * This function does not just reset the PCI portion of a device, but * clears all the state associated with the device. This function differs - * from __pci_reset_function() in that it saves and restores device state + * from __pci_reset_function_locked() in that it saves and restores device state * over the reset. It also differs from pci_reset_function() in that it * requires the PCI device lock to be held. * diff --git a/include/linux/pci.h b/include/linux/pci.h index 4acf321..b55e0cf 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1066,7 +1066,6 @@ int pcie_set_mps(struct pci_dev *dev, int mps); int pcie_get_minimum_link(struct pci_dev *dev, enum pci_bus_speed *speed, enum pcie_link_width *width); void pcie_flr(struct pci_dev *dev); -int __pci_reset_function(struct pci_dev *dev); int __pci_reset_function_locked(struct pci_dev *dev); int pci_reset_function(struct pci_dev *dev); int pci_reset_function_locked(struct pci_dev *dev);