Re: [PATCH] pci/controller: Use dev_fwnode()

From: Bjorn Helgaas
Date: Tue Jul 22 2025 - 19:21:01 EST


On Tue, Jul 22, 2025 at 08:24:26AM +0200, Jiri Slaby wrote:
> On 21. 07. 25, 19:08, Bjorn Helgaas wrote:
> > Jiri, question for you below about more possible drivers/pci/
> > conversions to use dev_fwnode() for struct device * cases.
>
> Sorry, I am a way too occupied :/.
>
> > Would like to get this in for v6.17 if these should be changed.
>
> It's not necessary, but a good to have cleanup (opposed to the posted fixes,
> which were required). I will switch those eventually, but I don't promise
> 6.17. (If someone does not beat me to it.)

It's not clear from the commit log:

irq_domain_create_simple() takes fwnode as the first argument. It can be
extracted from the struct device using dev_fwnode() helper instead of
using of_node with of_fwnode_handle().

So use the dev_fwnode() helper.

why the posted fixes are required (other than Arnd's change to
altera_pcie_init_irq_domain(), which fixes an unused variable warning
when CONFIG_OF is not enabled).

Since it sounds like no changes are required for the other ones I
mentioned, I'm going to leave them alone for now:

dw_pcie_allocate_domains()
mobiveil_allocate_msi_domains()
altera_allocate_domains()
mtk_pcie_allocate_msi_domains()
xilinx_pl_dma_pcie_init_msi_irq_domain()
nwl_pcie_init_msi_irq_domain()
plda_allocate_msi_domains()

Bjorn