From patchwork Mon Jul 10 23:21:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13307882 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 70F70C0015E for ; Mon, 10 Jul 2023 23:21:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230163AbjGJXVr (ORCPT ); Mon, 10 Jul 2023 19:21:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229658AbjGJXVq (ORCPT ); Mon, 10 Jul 2023 19:21:46 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 16A589E; Mon, 10 Jul 2023 16:21:46 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9BD936120F; Mon, 10 Jul 2023 23:21:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC17DC433C7; Mon, 10 Jul 2023 23:21:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689031305; bh=Y2j5rRb6xpdmsTT+BzTtvIQsL3CFQd80YIp40kH6XWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TbFXuy5Vv0hBg5idN4znCuGKIsX8jEd36bONo9ZEG5NX3lRVvAmZRJcvEJX7yzj2m fFysozuWhwBfcgcnVAgdxH+w7zAJmB89l2samqZD85Ulc65L5S3EYNRdBiub1jSBw1 a/Q5ixAAlOG7wRgt9sldqkfPeDfrL3TDKPr4atKjXZmlydnZtyK0FV+HIZss+qddoN PbUlsV22ayeXv7cg3P9vFUr7j6c7lFrlT1RidI64R0VACca3dIrvYbnGVKPN33vXY4 c2pyJvns5KNNZWvDvQKfuxU+HwzFMIDwW8Lx0NOBLMW4x+N58p7/iWwFJu8gaUyqFl UfI6ldbMzv/xA== From: Bjorn Helgaas To: linux-pci@vger.kernel.org Cc: Mahesh J Salgaonkar , Oliver O'Halloran , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 1/2] PCI/AER: Drop unused pci_disable_pcie_error_reporting() Date: Mon, 10 Jul 2023 18:21:35 -0500 Message-Id: <20230710232136.233034-2-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230710232136.233034-1-helgaas@kernel.org> References: <20230710232136.233034-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas pci_disable_pcie_error_reporting() has no callers. Remove it. Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig --- drivers/pci/pcie/aer.c | 12 ------------ include/linux/aer.h | 5 ----- 2 files changed, 17 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index f6c24ded134c..d4c948b7c449 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -242,18 +242,6 @@ int pci_enable_pcie_error_reporting(struct pci_dev *dev) } EXPORT_SYMBOL_GPL(pci_enable_pcie_error_reporting); -int pci_disable_pcie_error_reporting(struct pci_dev *dev) -{ - int rc; - - if (!pcie_aer_is_native(dev)) - return -EIO; - - rc = pcie_capability_clear_word(dev, PCI_EXP_DEVCTL, PCI_EXP_AER_FLAGS); - return pcibios_err_to_errno(rc); -} -EXPORT_SYMBOL_GPL(pci_disable_pcie_error_reporting); - int pci_aer_clear_nonfatal_status(struct pci_dev *dev) { int aer = dev->aer_cap; diff --git a/include/linux/aer.h b/include/linux/aer.h index 3a3ab05e13fd..aadc9242cb20 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h @@ -43,17 +43,12 @@ struct aer_capability_regs { #if defined(CONFIG_PCIEAER) /* PCIe port driver needs this function to enable AER */ int pci_enable_pcie_error_reporting(struct pci_dev *dev); -int pci_disable_pcie_error_reporting(struct pci_dev *dev); int pci_aer_clear_nonfatal_status(struct pci_dev *dev); #else static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev) { return -EINVAL; } -static inline int pci_disable_pcie_error_reporting(struct pci_dev *dev) -{ - return -EINVAL; -} static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev) { return -EINVAL; From patchwork Mon Jul 10 23:21:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 13307883 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C34EEB64D9 for ; Mon, 10 Jul 2023 23:21:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbjGJXVv (ORCPT ); Mon, 10 Jul 2023 19:21:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51446 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229923AbjGJXVt (ORCPT ); Mon, 10 Jul 2023 19:21:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2497C1B2; Mon, 10 Jul 2023 16:21:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AD74861261; Mon, 10 Jul 2023 23:21:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6E15C433C8; Mon, 10 Jul 2023 23:21:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689031307; bh=2JtYW2FAXLQ8IiaHZeQqlEM207zTV5RiNltF8zVSvU8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=O03pMjvFDkEjJ3HPx3J+xO4wSgoopx28xH9hy2035xQf5My4oVQDFXaYb2xclrUPz v/+ZifdXxQwENMyRcnRqXpV1IlgXe0cumqQkJowQs1dM0kuymbNurQ7pPHAKtCxDIK W8WZuurCq482vy7OehgQki2u7+HybImsKEds+PV1D0oBF5LHZWsnr0Nz4XkLyHPL3Q V9BtS6YhfFpbrVgZPoCKdvsjHkqR7e7AO+cVW2B0AB3/5ulC3dlhCkR06RhRnk3tyg fhK/ln78tFhL4mp7ecpVedBD5U7r4XoQNuM4wRZyLHy399MLBN3I+BzRIgRTShMSRb xwnYPJyNh7ObQ== From: Bjorn Helgaas To: linux-pci@vger.kernel.org Cc: Mahesh J Salgaonkar , Oliver O'Halloran , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 2/2] PCI/AER: Unexport pci_enable_pcie_error_reporting() Date: Mon, 10 Jul 2023 18:21:36 -0500 Message-Id: <20230710232136.233034-3-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230710232136.233034-1-helgaas@kernel.org> References: <20230710232136.233034-1-helgaas@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org From: Bjorn Helgaas pci_enable_pcie_error_reporting() is used only inside aer.c. Stop exposing it outside the file. Signed-off-by: Bjorn Helgaas Reviewed-by: Christoph Hellwig --- drivers/pci/pcie/aer.c | 3 +-- include/linux/aer.h | 6 ------ 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c index d4c948b7c449..645149608054 100644 --- a/drivers/pci/pcie/aer.c +++ b/drivers/pci/pcie/aer.c @@ -230,7 +230,7 @@ int pcie_aer_is_native(struct pci_dev *dev) return pcie_ports_native || host->native_aer; } -int pci_enable_pcie_error_reporting(struct pci_dev *dev) +static int pci_enable_pcie_error_reporting(struct pci_dev *dev) { int rc; @@ -240,7 +240,6 @@ int pci_enable_pcie_error_reporting(struct pci_dev *dev) rc = pcie_capability_set_word(dev, PCI_EXP_DEVCTL, PCI_EXP_AER_FLAGS); return pcibios_err_to_errno(rc); } -EXPORT_SYMBOL_GPL(pci_enable_pcie_error_reporting); int pci_aer_clear_nonfatal_status(struct pci_dev *dev) { diff --git a/include/linux/aer.h b/include/linux/aer.h index aadc9242cb20..2dd175f5debd 100644 --- a/include/linux/aer.h +++ b/include/linux/aer.h @@ -41,14 +41,8 @@ struct aer_capability_regs { }; #if defined(CONFIG_PCIEAER) -/* PCIe port driver needs this function to enable AER */ -int pci_enable_pcie_error_reporting(struct pci_dev *dev); int pci_aer_clear_nonfatal_status(struct pci_dev *dev); #else -static inline int pci_enable_pcie_error_reporting(struct pci_dev *dev) -{ - return -EINVAL; -} static inline int pci_aer_clear_nonfatal_status(struct pci_dev *dev) { return -EINVAL;