On 21/10/2020 10:33, Andy Shevchenko wrote: > On Wed, Oct 21, 2020 at 12:25:28AM +0100, Dan Scally wrote: >> On 20/10/2020 14:31, Sakari Ailus wrote: >>> On Mon, Oct 19, 2020 at 11:58:57PM +0100, Daniel Scally wrote: >>>> + return software_node_get(&c->fwnode); >>> I believe similarly, the function should drop the reference to the previous >>> node, and not expect the caller to do this. The OF equivalent does the >>> same. >> I think I prefer it this way myself, since the alternative is having to >> explicitly call *_node_get() on a returned child if you want to keep it >> but also keep iterating. But I agree that it's important to take a >> consistent approach. I'll add that too; this will mean >> swnode_graph_find_next_port() and >> software_node_graph_get_next_endpoint() in patch 4 of this series will >> need changing slightly to square away their references. > What about ACPI case? Does it square? ACPI version doesn't handle references at all; neither puts() the old nor gets() the new child node.
- Re: [RFC PATCH v3 1/9] software_node: Add h... Heikki Krogerus
- Re: [RFC PATCH v3 1/9] software_node: Add helpe... Dan Scally
- Re: [RFC PATCH v3 1/9] software_node: Add h... Andy Shevchenko
- Re: [RFC PATCH v3 1/9] software_node: A... Dan Scally
- [RFC PATCH v3 3/9] software_node: Fix failure to hold re... Daniel Scally
- Re: [RFC PATCH v3 3/9] software_node: Fix failure t... Rafael J. Wysocki
- Re: [RFC PATCH v3 3/9] software_node: Fix failure t... Sakari Ailus
- Re: [RFC PATCH v3 3/9] software_node: Fix failu... Dan Scally
- Re: [RFC PATCH v3 3/9] software_node: Fix f... Andy Shevchenko
- Re: [RFC PATCH v3 3/9] software_node: F... Sakari Ailus
- Re: [RFC PATCH v3 3/9] software_node: F... Dan Scally
- [RFC PATCH v3 7/9] ipu3-cio2: Check if pci_dev->dev's... Daniel Scally
- Re: [RFC PATCH v3 7/9] ipu3-cio2: Check if pci_dev-... Andy Shevchenko
- Re: [RFC PATCH v3 7/9] ipu3-cio2: Check if pci_... Sakari Ailus
- Re: [RFC PATCH v3 7/9] ipu3-cio2: Check if ... Dan Scally
- Re: [RFC PATCH v3 7/9] ipu3-cio2: Check... Sakari Ailus
- Re: [RFC PATCH v3 7/9] ipu3-cio2: ... Dan Scally
- [RFC PATCH v3 4/9] software_node: Add support for fwnode... Daniel Scally
- Re: [RFC PATCH v3 4/9] software_node: Add support f... Andy Shevchenko
- Re: [RFC PATCH v3 4/9] software_node: Add support f... Sakari Ailus
- Re: [RFC PATCH v3 4/9] software_node: Add suppo... Sakari Ailus