On Mon, Nov 17, 2025 at 02:53:00PM +0530, Siddharth Vadapalli wrote:
On Mon, 2025-11-17 at 10:06 +0100, Arnd Bergmann wrote:
On Mon, Nov 17, 2025, at 07:05, Siddharth Vadapalli wrote:
On Fri, 2025-11-14 at 08:03 +0100, Arnd Bergmann wrote:
On Fri, Nov 14, 2025, at 06:47, Siddharth Vadapalli wrote:
I understand that the solution should be fixing the pci-j721e.c driver rather than updating Kconfig or Makefile. Thank you for the feedback. I will update the pci-j721e.c driver to handle the case that is triggering the build error.
Ok, thanks!
I think a single if(IS_ENABLED(CONFIG_PCI_J721E_HOST)) check is probably enough to avoid the link failure
--- a/drivers/pci/controller/cadence/pci-j721e.c +++ b/drivers/pci/controller/cadence/pci-j721e.c @@ -669,7 +669,8 @@ static void j721e_pcie_remove(struct platform_device *pdev) struct cdns_pcie_ep *ep; struct cdns_pcie_rc *rc;
if (pcie->mode == PCI_MODE_RC) {
if (IS_ENABLED(CONFIG_PCI_J721E_HOST) &&pcie->mode == PCI_MODE_RC) { rc = container_of(cdns_pcie, struct cdns_pcie_rc, pcie); cdns_pcie_host_disable(rc);but you may want to split it up further to get better dead code elimination and prevent similar bugs from reappearing when another call gets added without this type of check.
If you split j721e_pcie_driver into a host and an ep driver structure with their own probe/remove callbacks, you can move the IS_ENABLED() check all the way into module_init() function.
Thank you for the suggestion :)
Would it work if I send a quick fix for `cdns_pcie_host_disable` using IS_ENABLED in the existing driver implementation and then send the refactoring series later? This is to resolve the build error quickly until the refactoring series is ready.
This will work for me so that this fix can be backported.
- Mani