Re: [PATCH v2 2/6] firmware: ti_sci: Partial-IO support

From: Nishanth Menon
Date: Wed Jul 31 2024 - 09:03:11 EST


On 14:36-20240731, Markus Schneider-Pargmann wrote:
> > > > > + for (i = 0; i != info->nr_wakeup_sources; ++i) {
> > > > > + struct device_node *devnode =
> > > > > + of_parse_phandle(dev->of_node,
> > > > > + "ti,partial-io-wakeup-sources",
> > > > > + i);
> > > > > + info->wakeup_source_nodes[i] = devnode;
> > > >
> > > > Curious: Don't we need to maintain reference counting for the devnode
> > > > if CONFIG_OF_DYNAMIC?
> > >
> > > In case you mean I missed of_node_put(), yes, I did, thank you. I added
> > > it in a ti_sci_remove().
> >
> > And unless I am mistaken, of_node_get as required as you are
> > retaining the reference of the node till shutdown / remove is invoked.
>
> The function documentation says the refcount is already incremented:
>
> * Return: The device_node pointer with refcount incremented. Use
> * of_node_put() on it when done.
>

Yes indeed. I missed it. Thanks for looking it up.

--
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D