Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp624478rdb; Thu, 22 Feb 2024 14:17:45 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVUAYnXur+QYsK2ij0l/GDkSBh1CqbsUfPUd36OXMeBusTABY/2TtGGvLUxDcvUh6WQeSs0rkjjrI39ppuyw458t7FgGSAlV4IzvZFikg== X-Google-Smtp-Source: AGHT+IEpfGieq8shgTd1q+ycxc2SDiG23j+n8OBd43yNS8UK5Cy8UVDaPS+EdhdZV73DS3w2A6la X-Received: by 2002:a17:902:ce84:b0:1dc:54db:c610 with SMTP id f4-20020a170902ce8400b001dc54dbc610mr195704plg.41.1708640265409; Thu, 22 Feb 2024 14:17:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708640265; cv=pass; d=google.com; s=arc-20160816; b=HksQT0Uzn1moh8D88wVRYBaMvZrC3sQvlkVDVBJGgnnykYIoS4Iz0dLLvFN1NJqBcc JhETwJ8+XwNnZ6y/ij6Ib8vD7DFKlTTagS7CZ2x3+W1eq+NU9NaMsknhoE0aCY4xagQD p6+og8J77vluueXFBpD5cvMDSUigwWR6VAUQ7dcug7Gn3fYYKM7CJwA7MtMac5RGlVLx dXMKvUny8m4hO3MeOnS/dSYvnFW9sTB6Be7ijxfeKLQ80GLNqHTef8VL2g7on6DFn7DP W75bCyUZ3ik9rC6a9slbLikwLDfTqc0D57i0vCEfm3894kdlUnHfjIkUnCrJcI3Sfoc2 ADOQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=kuWR9uRbhek61YerHrmxbf2u9syCwVcyZvbkeovVBrI=; fh=DQlX4VOMXAZHEB/OHnjBToSsYwvB2UyOs7+/HRg3P7c=; b=LhRCK5BURtJmW3pim5G8RzKfCXoAUhNk/60UF6/G5qy7QvykVswKH31zibWe7Lq04e CwgqCGGrvMVkKyyv+yH0tMMZH7PBBJQSiqyDgc5yDRjPoPRTbprBd0b/ExLT3yPteMP7 L12D0/r/Cblwe1nlKGnunE7p1E7pFR1TSpf3/ho7faqw2UJ9CGGKgxbZxTxcPcyzDQ73 G/6yIhreevCxMDRS4tuwgAnqrwXl8HBdMjvzo62dEu0ZQ4ebTvhxEhu9YlkUwN2F/IbO tNuGYhh6boRHuZObqL4RX2okSdbgFs+nHUEvu6z55Y0ajJbmWB+xGNL8DweOnkoTCjja 5HyA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ocbsyBFE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77459-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id a4-20020a170902ecc400b001d9ec0d76b6si9856268plh.585.2024.02.22.14.17.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 14:17:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77459-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ocbsyBFE; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-77459-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77459-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 9A0A2B24B8B for ; Thu, 22 Feb 2024 22:16:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95F0B13BAE9; Thu, 22 Feb 2024 22:15:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ocbsyBFE" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B9A7513BAD9; Thu, 22 Feb 2024 22:15:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708640140; cv=none; b=mqXpom37QUKT8dStiSfGN2/hmGfeMJ5fo8VECfSIcgGTVxzJWSLnzgs1s7GXDp5qeIVcVop3PRjIXROZ16bStYt/GW45yxQKFXhhIbxNLutQ+gxjfpw2dGDUVPIo8V5ujq2w/+SV8r9YnOA1/NykY3MxMyuZ+0jyctO+VVD6t5o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708640140; c=relaxed/simple; bh=hhEw0qiaiAYkiEH9B0A5irgUskKyCnw76BLLf50VB+A=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=qNT2FMx4CpmWQ1pEL/NSGwWU4JUhe0+QDFKUdLymfojy5eDM+K5m0T78R2eYBEoRDB1oyqrf5gAI7YfZEb2ieEO3vUbqN/WH/LtgfqMH2V0J3JHqRu8V+qf8aCUEhurM9Bwdy5FSibIJkkrnlT1NrfQV4Rtkqu0qTcfd6juWJp8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ocbsyBFE; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0107DC43394; Thu, 22 Feb 2024 22:15:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708640140; bh=hhEw0qiaiAYkiEH9B0A5irgUskKyCnw76BLLf50VB+A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ocbsyBFETCqICZl+rLoPCOLZarNPdHIPeSe5/DanR0suSE7dBzbun6UTv6mTaHMNB QJK1kedCyyHc9ls/oSv6LNUPHFCtMUetX0QF45quWxmYJWQDCzmu2iOhEUMnKisPqr aedpNd2xLasUeBScB8VsYke6iisaEGKeXgnO3/YjDrk4GbAQ1FGKLZZjQuvZfQi4tb 0mKuomPEzKK91AElsAm/kuvsmkb9HdJoQicZRL+1kfwxIbh1WkdSjrB7UwFU4/YdWb hdm3TgbINREcLvfvVcK7A86h6YedloY/tMAtrR6ZS67o1olUFA7psOkfLmmjtKTyfg rKOqCy5ezvrLw== From: Bjorn Helgaas To: linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Kuppuswamy Sathyanarayanan , Matthew W Carlis , Keith Busch , Lukas Wunner , Mika Westerberg , Jesse Brandeburg , Bjorn Helgaas Subject: [PATCH v2 3/3] PCI/DPC: Encapsulate pci_acpi_add_edr_notifier() Date: Thu, 22 Feb 2024 16:15:21 -0600 Message-Id: <20240222221521.32159-4-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222221521.32159-1-helgaas@kernel.org> References: <20240222221521.32159-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Bjorn Helgaas pci_acpi_add_edr_notifier() and pci_acpi_remove_edr_notifier() are only referenced inside drivers/pci/. Move their declarations from include/linux/pci-acpi.h to drivers/pci/pci.h so they're not visible outside drivers/pci/. Signed-off-by: Bjorn Helgaas --- drivers/pci/pci.h | 4 ++++ include/linux/pci-acpi.h | 8 -------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 2336a8d1edab..03bf2776d73b 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -432,11 +432,15 @@ void pci_dpc_init(struct pci_dev *pdev); void dpc_process_error(struct pci_dev *pdev); pci_ers_result_t dpc_reset_link(struct pci_dev *pdev); bool pci_dpc_recovered(struct pci_dev *pdev); +void pci_acpi_add_edr_notifier(struct pci_dev *pdev); +void pci_acpi_remove_edr_notifier(struct pci_dev *pdev); #else static inline void pci_save_dpc_state(struct pci_dev *dev) { } static inline void pci_restore_dpc_state(struct pci_dev *dev) { } static inline void pci_dpc_init(struct pci_dev *pdev) { } static inline bool pci_dpc_recovered(struct pci_dev *pdev) { return false; } +static inline void pci_acpi_add_edr_notifier(struct pci_dev *pdev) { } +static inline void pci_acpi_remove_edr_notifier(struct pci_dev *pdev) { } #endif #ifdef CONFIG_PCIEPORTBUS diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 92e196ba0249..f447ce215adf 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h @@ -122,14 +122,6 @@ extern const guid_t pci_acpi_dsm_guid; #define DSM_PCI_POWER_ON_RESET_DELAY 0x08 #define DSM_PCI_DEVICE_READINESS_DURATIONS 0x09 -#ifdef CONFIG_PCIE_DPC -void pci_acpi_add_edr_notifier(struct pci_dev *pdev); -void pci_acpi_remove_edr_notifier(struct pci_dev *pdev); -#else -static inline void pci_acpi_add_edr_notifier(struct pci_dev *pdev) { } -static inline void pci_acpi_remove_edr_notifier(struct pci_dev *pdev) { } -#endif /* CONFIG_PCIE_DPC */ - int pci_acpi_set_companion_lookup_hook(struct acpi_device *(*func)(struct pci_dev *)); void pci_acpi_clear_companion_lookup_hook(void); -- 2.34.1