Re: [PATCH net-next v2] net: gianfar: Use device_get_named_child_node_count()
From: Simon Horman
Date: Wed Jun 18 2025 - 14:58:46 EST
On Wed, Jun 18, 2025 at 03:22:02PM +0300, Matti Vaittinen wrote:
> We can avoid open-coding the loop construct which counts firmware child
> nodes with a specific name by using the newly added
> device_get_named_child_node_count().
>
> The gianfar driver has such open-coded loop. Replace it with the
> device_get_child_node_count_named().
>
> Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> ---
> Previously sent as part of the BD79124 ADC series:
> https://lore.kernel.org/all/95b6015cd5f6fcce535982118543d47504ed609f.1742225817.git.mazziesaccount@xxxxxxxxx/
>
> All dependencies should be in net-next now.
>
> Compile tested only!
Thanks for resending.
Reviewed-by: Simon Horman <horms@xxxxxxxxxx>