]> git.itanic.dy.fi Git - linux-stable/commit
PCI/ERR: Reduce compile time for CONFIG_PCIEAER=n
authorLukas Wunner <lukas@wunner.de>
Sat, 31 Jul 2021 12:39:04 +0000 (14:39 +0200)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 16 Oct 2021 14:16:59 +0000 (09:16 -0500)
commitf9a6c8ad4922bf386c366e5ece453d459e628784
tree08f3ee3613e44fb6ad21f05bec39239e24111d73
parentbb6951b84fb46f4048ead76c524a084e7b132463
PCI/ERR: Reduce compile time for CONFIG_PCIEAER=n

The sole non-static function in err.c, pcie_do_recovery(), is only
called from:

* aer.c (if CONFIG_PCIEAER=y)
* dpc.c (if CONFIG_PCIE_DPC=y, which depends on CONFIG_PCIEAER)
* edr.c (if CONFIG_PCIE_EDR=y, which depends on CONFIG_PCIE_DPC)

Thus, err.c need not be compiled if CONFIG_PCIEAER=n.

Also, pci_uevent_ers() and pcie_clear_device_status(), which are called
from err.c, can be #ifdef'ed away unless CONFIG_PCIEAER=y.

Since x86_64_defconfig doesn't enable CONFIG_PCIEAER, this change may
slightly reduce compile time for anyone doing a test build with that
config.

Link: https://lore.kernel.org/r/98f9041151268c1c035ab64cca320ad86803f64a.1627638184.git.lukas@wunner.de
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/pci-driver.c
drivers/pci/pci.c
drivers/pci/pcie/Makefile