Re: [PATCHv2] PCI: dwc: uniphier: use fwnode API for legacy-interrupt-controller

From: Manivannan Sadhasivam

Date: Thu Sep 10 2026 - 04:03:28 EST


On Wed, Jul 22, 2026 at 04:15:32PM -0700, Rosen Penev wrote:
> Convert uniphier_pcie_config_intx_irq() from the OF-specific to the
> generic firmware-node API: of_get_child_by_name() to
> device_get_named_child_node(), irq_of_parse_and_map() to
> fwnode_irq_get(), of_fwnode_handle() on the child node to passing the
> fwnode directly, and of_node_put() to fwnode_handle_put().
>
> Unlike irq_of_parse_and_map(), fwnode_irq_get() returns a positive IRQ
> or a negative errno and never 0 (it rewrites 0 to -EINVAL), so check
> pp->irq < 0 and propagate the error. pp->irq is an int, so the negative
> value is preserved. Drop the now-unused np / dev_fwnode() locals, since
> device_get_named_child_node() operates on the device directly.
>
> Built for arm64 (defconfig + CONFIG_PCIE_UNIPHIER) with LLVM=1;
> drivers/pci/controller/dwc/pcie-uniphier.o compiles cleanly.
>
> Assisted-by: opencode:hy3-free
> Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>

What is the point of doing all these conversions of an OF only driver to fwnode?
It just adds noise and provide no value.

- Mani

--
மணிவண்ணன் சதாசிவம்