Re: [PATCH 2/6] PCI: of: Use device_{add,remove}_of_node() to attach of_node to existing device

Herve Codina
2024-11-05T16:16:58Z

Hi Rob,

On Mon, 4 Nov 2024 14:20:08 -0600
Rob Herring <robh@kernel.org> wrote:

> On Mon, Nov 04, 2024 at 06:19:56PM +0100, Herve Codina wrote:
> > The commit 407d1a51921e ("PCI: Create device tree node for bridge")
> > creates of_node for PCI devices. The newly created of_node is attached
> > to an existing device. This is done setting directly pdev->dev.of_node
> > in the code.
> >
> > Even if pdev->dev.of_node cannot be previously set, this doesn't handle
> > the fwnode field of the struct device. Indeed, this field needs to be
> > set if it hasn't already been set.
> >
> > device_{add,remove}_of_node() have been introduced to handle this case.
> >
> > Use them instead of the direct setting.
> >
> > Fixes: 407d1a51921e ("PCI: Create device tree node for bridge")
> > Cc: stable@vger.kernel.org
>
> I don't think this is stable material. What exactly would is broken
> which would be fixed by just the first 2 patches?

Hum indeed, I haven't observed a broken behavior in current kernel.
I will remove Fixes and Cc in the next iteration.

Best regards,
Hervé