[PATCH] PCI: controller: use dev_fwnode()

Jiri Slaby jirislaby at kernel.org
Thu Jul 24 22:37:00 PDT 2025


On 25. 07. 25, 1:10, Bjorn Helgaas wrote:
> [+cc Arnd, Nam]
> 
> On Wed, Jul 23, 2025 at 08:59:07AM +0200, Jiri Slaby (SUSE) wrote:
>> All irq_domain functions now accept fwnode instead of of_node. But many
>> PCI controllers still extract dev to of_node and then of_node to fwnode.
>>
>> Instead, clean this up and simply use the dev_fwnode() helper to extract
>> fwnode directly from dev. Internally, it still does dev => of_node =>
>> fwnode steps, but it's now hidden from the users.
>>
>> Signed-off-by: Jiri Slaby (SUSE) <jirislaby at kernel.org>
>> Link: https://lore.kernel.org/all/4ee9c7c0-4a3f-4afa-ae5a-7fd8a750c92b@kernel.org/
>> Link: https://lore.kernel.org/all/4bc0e1ca-a523-424a-8759-59e353317fba@kernel.org/
> 
> Thanks, Jiri, I applied this on pci/controller/msi-parent for v6.17;
> it's at
> https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=controller/msi-parent
> 
> The dev_fwnode() conversions touched the same places as Nam's changes
> to use msi_create_parent_irq_domain().  The previous dev_fwnode()
> conversions were *before* Nam's changes and these are *after*, and it
> all ended up looking more complicated than I wanted, so I squashed all
> the dev_fwnode() conversions together in
> https://git.kernel.org/cgit/linux/kernel/git/pci/pci.git/commit/?id=a103d2dede56
> ("PCI: controller: Use dev_fwnode() instead of of_fwnode_handle()")
> and then added Nam's msi_create_parent_irq_domain() patches on top.
> 
> So a103d2dede56 ("PCI: controller: Use dev_fwnode() instead of
> of_fwnode_handle()") ends up *looking* different from the patch below,
> but I think having them all together makes it more obvious that
> they're all making the same conversion, and I think the end result is
> identical.

Makes sense to me.

Thanks!

-- 
js
suse labs



More information about the linux-arm-kernel mailing list