Re: [PATCH 6/6] net: mvpp2: use device_for_each_child_node() to access device child nodes
From: Jonathan Cameron
Date: Sun Jul 07 2024 - 13:02:03 EST
On Sat, 06 Jul 2024 17:23:38 +0200
Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx> wrote:
> The iterated nodes are direct children of the device node, and the
> `device_for_each_child_node()` macro accounts for child node
> availability.
>
> `fwnode_for_each_available_child_node()` is meant to access the child
> nodes of an fwnode, and therefore not direct child nodes of the device
> node.
>
> The child nodes within mvpp2_probe are not accessed outside the lopps,
> and the socped version of the macro can be used to automatically
> decrement the refcount on early exits.
>
> Use `device_for_each_child_node()` and its scoped variant to indicate
> device's direct child nodes.
>
> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@xxxxxxxxx>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>