From 886719cd126d18c97c693bb0a021b566f6589fc3 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Tue, 5 May 2026 13:04:53 +0300 Subject: [PATCH 01/31] PCI: cadence: Preserve all error codes in cdns_plat_pcie_probe() The blamed commit functionally changed the error path of cdns_pcie_host_probe(), now cdns_plat_pcie_probe(). When the old code path executed "goto err_get_sync", the PCIe controller probe function propagated the pm_runtime_get_sync() error code. The new code doesn't, and returns 0. Similarly for the "goto err_init" previously triggered by cdns_pcie_host_init() errors, and now triggered by cdns_pcie_host_setup() and cdns_pcie_ep_setup() errors. These are not propagated and will result in probing success, which is incorrect. Fixes: bd22885aa188 ("PCI: cadence: Refactor driver to use as a core library") Signed-off-by: Vladimir Oltean Acked-by: Bjorn Helgaas Signed-off-by: Linux RISC-V bot --- drivers/pci/controller/cadence/pcie-cadence-plat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/cadence/pcie-cadence-plat.c b/drivers/pci/controller/cadence/pcie-cadence-plat.c index b067a3296dd372..8b12a46b56019a 100644 --- a/drivers/pci/controller/cadence/pcie-cadence-plat.c +++ b/drivers/pci/controller/cadence/pcie-cadence-plat.c @@ -126,7 +126,7 @@ static int cdns_plat_pcie_probe(struct platform_device *pdev) while (phy_count--) device_link_del(cdns_plat_pcie->pcie->link[phy_count]); - return 0; + return ret; } static void cdns_plat_pcie_shutdown(struct platform_device *pdev) From f5a36f3474a24a3c031f661ba7528a8f0a67c501 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Tue, 5 May 2026 13:04:54 +0300 Subject: [PATCH 02/31] ata: add where missing It appears that libahci.c, ahci.c as well as the ahci_brcm, ahci_ceva and ahci_qoriq drivers are using runtime PM operations without including . This header is somehow being indirectly provided by , which would like to drop it (none of the functions it exports need it). Signed-off-by: Vladimir Oltean Acked-by: Damien Le Moal Signed-off-by: Linux RISC-V bot --- drivers/ata/ahci.c | 1 + drivers/ata/ahci_brcm.c | 1 + drivers/ata/ahci_ceva.c | 1 + drivers/ata/ahci_qoriq.c | 1 + drivers/ata/libahci.c | 1 + 5 files changed, 5 insertions(+) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 1d73a53370cf3e..1396a53bd6df3f 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/ata/ahci_brcm.c b/drivers/ata/ahci_brcm.c index 29be74fedcf019..48460e515722a9 100644 --- a/drivers/ata/ahci_brcm.c +++ b/drivers/ata/ahci_brcm.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/drivers/ata/ahci_ceva.c b/drivers/ata/ahci_ceva.c index 2d6a08c23d6ad5..3938bf3783410f 100644 --- a/drivers/ata/ahci_ceva.c +++ b/drivers/ata/ahci_ceva.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "ahci.h" diff --git a/drivers/ata/ahci_qoriq.c b/drivers/ata/ahci_qoriq.c index 0dec1a17e5b1ff..409152bfefb6de 100644 --- a/drivers/ata/ahci_qoriq.c +++ b/drivers/ata/ahci_qoriq.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include "ahci.h" diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index c79abdfcd7a9b0..e0de4703a4f2dc 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "ahci.h" #include "libata.h" From 7d3f0c438a06d42074e49ec598de2a5ca12b55ff Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Tue, 5 May 2026 13:04:55 +0300 Subject: [PATCH 03/31] PCI: Add missing headers transitively included by The tegra as well as a few dwc PCI controller drivers uses PM runtime operations without including the required header. Similarly, pcie-rockchip-host, pcie-starfive as well as a few dwc PCI controllers use the regulator consumer API without including . pcie-spacemit-k1.c uses of_get_next_available_child() and of_node_put() without including . It seems these function prototypes were indirectly provided by , mostly by mistake (none of the functions it exports need it). Before the PHY header can drop the unnecessary includes, make sure the PCI controller drivers include what they use. Signed-off-by: Vladimir Oltean Acked-by: Bjorn Helgaas Signed-off-by: Linux RISC-V bot --- drivers/pci/controller/dwc/pci-keystone.c | 1 + drivers/pci/controller/dwc/pcie-dw-rockchip.c | 1 + drivers/pci/controller/dwc/pcie-histb.c | 1 + drivers/pci/controller/dwc/pcie-qcom-ep.c | 1 + drivers/pci/controller/dwc/pcie-spacemit-k1.c | 3 +++ drivers/pci/controller/dwc/pcie-tegra194.c | 1 + drivers/pci/controller/pci-tegra.c | 1 + drivers/pci/controller/pcie-rockchip-host.c | 1 + drivers/pci/controller/plda/pcie-starfive.c | 1 + 9 files changed, 11 insertions(+) diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c index 278d2dba1db08d..fe4836925c4e31 100644 --- a/drivers/pci/controller/dwc/pci-keystone.c +++ b/drivers/pci/controller/dwc/pci-keystone.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c index 731d93663ccae5..ae27ce05247c19 100644 --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/pci/controller/dwc/pcie-histb.c b/drivers/pci/controller/dwc/pcie-histb.c index a52071589377ae..432a54c5bfceaa 100644 --- a/drivers/pci/controller/dwc/pcie-histb.c +++ b/drivers/pci/controller/dwc/pcie-histb.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/drivers/pci/controller/dwc/pcie-qcom-ep.c b/drivers/pci/controller/dwc/pcie-qcom-ep.c index 257c2bcb5f76f4..35a297923e7fb1 100644 --- a/drivers/pci/controller/dwc/pcie-qcom-ep.c +++ b/drivers/pci/controller/dwc/pcie-qcom-ep.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/pci/controller/dwc/pcie-spacemit-k1.c b/drivers/pci/controller/dwc/pcie-spacemit-k1.c index be20a520255b68..41316aa5410652 100644 --- a/drivers/pci/controller/dwc/pcie-spacemit-k1.c +++ b/drivers/pci/controller/dwc/pcie-spacemit-k1.c @@ -13,9 +13,12 @@ #include #include #include +#include #include #include +#include #include +#include #include #include diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c index 9dcfa194050e7f..f1d08814a73c59 100644 --- a/drivers/pci/controller/dwc/pcie-tegra194.c +++ b/drivers/pci/controller/dwc/pcie-tegra194.c @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c index 512309763d1fbf..a2c1662b6e81cf 100644 --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/pci/controller/pcie-rockchip-host.c b/drivers/pci/controller/pcie-rockchip-host.c index ee1822ca01db34..46adb4582fccf6 100644 --- a/drivers/pci/controller/pcie-rockchip-host.c +++ b/drivers/pci/controller/pcie-rockchip-host.c @@ -24,6 +24,7 @@ #include #include #include +#include #include "../pci.h" #include "pcie-rockchip.h" diff --git a/drivers/pci/controller/plda/pcie-starfive.c b/drivers/pci/controller/plda/pcie-starfive.c index 298036c3e7f949..22344cca167bca 100644 --- a/drivers/pci/controller/plda/pcie-starfive.c +++ b/drivers/pci/controller/plda/pcie-starfive.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "../../pci.h" From 457ca86393de7a114c6cafb80ba2fd79858a68c6 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Tue, 5 May 2026 13:04:56 +0300 Subject: [PATCH 04/31] usb: add missing headers transitively included by The chipidea ci_hdrc_imx driver uses regulator consumer API like regulator_enable() but does not include . The core USB HCD driver calls invalidate_kernel_vmap_range() and flush_kernel_vmap_range(), but does not include . The DWC3 gadget driver calls: - device_property_present() - device_property_count_u8() - device_property_read_u8_array() but does not include Similarly, dwc3-imx uses device_property_read_bool() without including . The dwc3-generic-plat driver uses of_device_get_match_data() but does not include . In all these cases, the necessary includes were still provided somehow, directly or indirectly, through . I found the following command to be quite helpful in figuring out the include chain: $ make KCFLAGS="-H" drivers/usb/dwc3/dwc3-imx.o Since wants to drop the unnecessary includes, fill in the required headers to avoid any breakage. Signed-off-by: Vladimir Oltean Acked-by: Thinh Nguyen # dwc3 Acked-by: Greg Kroah-Hartman Signed-off-by: Linux RISC-V bot --- drivers/usb/chipidea/ci_hdrc_imx.c | 1 + drivers/usb/core/hcd.c | 1 + drivers/usb/dwc3/dwc3-generic-plat.c | 1 + drivers/usb/dwc3/dwc3-imx.c | 1 + drivers/usb/dwc3/gadget.c | 1 + 5 files changed, 5 insertions(+) diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c index 56d2ba824a0b20..0a21d7cc5f5a99 100644 --- a/drivers/usb/chipidea/ci_hdrc_imx.c +++ b/drivers/usb/chipidea/ci_hdrc_imx.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "ci.h" #include "ci_hdrc_imx.h" diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 89221f1ce7694f..b3826ebcbe98d2 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/dwc3/dwc3-generic-plat.c b/drivers/usb/dwc3/dwc3-generic-plat.c index ca69ac0eb07cec..2f2ae6f4704f3e 100644 --- a/drivers/usb/dwc3/dwc3-generic-plat.c +++ b/drivers/usb/dwc3/dwc3-generic-plat.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/drivers/usb/dwc3/dwc3-imx.c b/drivers/usb/dwc3/dwc3-imx.c index 973a486b544d5e..6e122674edaf92 100644 --- a/drivers/usb/dwc3/dwc3-imx.c +++ b/drivers/usb/dwc3/dwc3-imx.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "core.h" #include "glue.h" diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 3d4ca68e584c7b..b5a6fd2899f182 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include From e07b8aa7b46a329e52636a460506b8e97d536269 Mon Sep 17 00:00:00 2001 From: Vladimir Oltean Date: Tue, 5 May 2026 13:04:57 +0300 Subject: [PATCH 05/31] drm: add where missing Multiple DRM bridge drivers use runtime PM operations without including the proper header, instead relying on transitive inclusion by . The PHY subsystem wants to get rid of headers it provides for no reason, so modify these drivers to include what they need directly. Signed-off-by: Vladimir Oltean Signed-off-by: Linux RISC-V bot --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 1 + drivers/gpu/drm/bridge/nwl-dsi.c | 1 + drivers/gpu/drm/bridge/samsung-dsim.c | 1 + drivers/gpu/drm/msm/dp/dp_aux.c | 1 + drivers/gpu/drm/rockchip/cdn-dp-core.c | 1 + 6 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 8dee5f2fbde516..4ee08663e62644 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index 064c6915c8960e..d20c0f8ad04cc5 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c index 2f7429b24fc20d..9ac8796ae91ee0 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index c3eb437ef1b0b2..4244434747af13 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include