Re: [PATCH 04/18] software_node: Enforce parent before child ordering of nodes array for software_node_register_nodes()

2020-11-30 Thread Dan Scally
Hi Laurent On 30/11/2020 16:12, Laurent Pinchart wrote: > On Mon, Nov 30, 2020 at 06:11:52PM +0200, Laurent Pinchart wrote: >> Hi Daniel, >> >> Thank you for the patch. >> >> On Mon, Nov 30, 2020 at 01:31:15PM +, Daniel Scally wrote: >>> Registering software_nodes with the .parent member set

Re: [PATCH 04/18] software_node: Enforce parent before child ordering of nodes array for software_node_register_nodes()

2020-11-30 Thread Andy Shevchenko
On Mon, Nov 30, 2020 at 07:35:30PM +0200, Andy Shevchenko wrote: > On Mon, Nov 30, 2020 at 01:31:15PM +, Daniel Scally wrote: ... > > for (i = 0; nodes[i].name; i++) { > > + if (nodes[i].parent) > > + if (!software_node_to_swnode(nodes[i].parent)) { > > +

Re: [PATCH 04/18] software_node: Enforce parent before child ordering of nodes array for software_node_register_nodes()

2020-11-30 Thread Andy Shevchenko
On Mon, Nov 30, 2020 at 01:31:15PM +, Daniel Scally wrote: > Registering software_nodes with the .parent member set to point to a > currently unregistered software_node has the potential for problems, > so enforce parent -> child ordering in arrays passed to this function. I agree with

Re: [PATCH 04/18] software_node: Enforce parent before child ordering of nodes array for software_node_register_nodes()

2020-11-30 Thread Laurent Pinchart
Hi Daniel, Thank you for the patch. On Mon, Nov 30, 2020 at 01:31:15PM +, Daniel Scally wrote: > Registering software_nodes with the .parent member set to point to a > currently unregistered software_node has the potential for problems, > so enforce parent -> child ordering in arrays passed

Re: [PATCH 04/18] software_node: Enforce parent before child ordering of nodes array for software_node_register_nodes()

2020-11-30 Thread Laurent Pinchart
On Mon, Nov 30, 2020 at 06:11:52PM +0200, Laurent Pinchart wrote: > Hi Daniel, > > Thank you for the patch. > > On Mon, Nov 30, 2020 at 01:31:15PM +, Daniel Scally wrote: > > Registering software_nodes with the .parent member set to point to a > > currently unregistered software_node has the

[PATCH 04/18] software_node: Enforce parent before child ordering of nodes array for software_node_register_nodes()

2020-11-30 Thread Daniel Scally
Registering software_nodes with the .parent member set to point to a currently unregistered software_node has the potential for problems, so enforce parent -> child ordering in arrays passed to this function. Suggested-by: Andy Shevchenko Signed-off-by: Daniel Scally --- Changes since RFC v3: