kernel_samsung_a53x/drivers/pci/controller/dwc
Uwe Kleine-König af79046b9f PCI: exynos: Don't discard .remove() callback
[ Upstream commit 83a939f0fdc208ff3639dd3d42ac9b3c35607fd2 ]

With CONFIG_PCI_EXYNOS=y and exynos_pcie_remove() marked with __exit, the
function is discarded from the driver. In this case a bound device can
still get unbound, e.g via sysfs. Then no cleanup code is run resulting in
resource leaks or worse.

The right thing to do is do always have the remove callback available.
This fixes the following warning by modpost:

  WARNING: modpost: drivers/pci/controller/dwc/pci-exynos: section mismatch in reference: exynos_pcie_driver+0x8 (section: .data) -> exynos_pcie_remove (section: .exit.text)

(with ARCH=x86_64 W=1 allmodconfig).

Fixes: 340cba6092c2 ("pci: Add PCIe driver for Samsung Exynos")
Link: https://lore.kernel.org/r/20231001170254.2506508-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 11:43:27 +01:00
..
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-dra7xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-exynos.c PCI: exynos: Don't discard .remove() callback 2024-11-18 11:43:27 +01:00
pci-imx6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-keystone.c PCI: keystone: Don't discard .probe() callback 2024-11-18 11:43:25 +01:00
pci-layerscape-ep.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-layerscape.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pci-meson.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-al.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-armada8k.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-artpec6.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-designware-ep.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-designware-host.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-designware-plat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-designware.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-designware.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-exynos-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-exynos-dbg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-exynos-dbg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-exynos-rc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-exynos-rc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-exynosS5E9925-rc-cal.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-exynosS5E9925-rc-cal_s5300.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-hisi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-histb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-intel-gw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-kirin.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-qcom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-spear13xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-tegra194.c PCI: tegra194: Use FIELD_GET()/FIELD_PREP() with Link Width fields 2024-11-18 11:43:14 +01:00
pcie-uniphier-ep.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcie-uniphier.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00