net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper
PATCH 1/1 net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper
Simplify miic_parse_dt() by using the for_each_available_child_of_node() helper instead of manually skipping unavailable child nodes.
Signed-off-by Geert Uytterhoeven <[email protected]>
--- drivers/net/pcs/pcs-rzn1-miic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/pcs/pcs-rzn1-miic.c +1 -4
@@ -472,13 +472,10 @@ static int miic_parse_dt(struct device *dev, u32 *mode_cfg)if (of_property_read_u32 (np,"renesas,miic-switch-portin" , &conf) ==0 ) dt_val[0 ] = conf; -for_each_child_of_node (np, conv) { +for_each_available_child_of_node (np, conv) {if (of_property_read_u32 (conv,"reg" , &port))continue ; -if (!of_device_is_available (conv)) -continue ; -if (of_property_read_u32 (conv,"renesas,miic-input" , &conf) ==0 ) dt_val[port] = conf; }
Signature · 1 line
2.43.0
Quoted 4 lines · Geert Uytterhoeven
Simplify
miic_parse_dt()by using thefor_each_available_child_of_node()helper instead of manually skipping unavailable child nodes.Signed-off-by Geert Uytterhoeven <[email protected]>
Reviewed-by Simon Horman <[email protected]>
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 7 lines · On Wed, 5 Feb 2025 17:09:47 +0100 you wrote:
Simplify
miic_parse_dt()by using thefor_each_available_child_of_node()helper instead of manually skipping unavailable child nodes.Signed-off-by Geert Uytterhoeven <[email protected]>--- drivers/net/pcs/pcs-rzn1-miic.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
Here is the summary with links:
- [net-next] net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper
https://git.kernel.org/netdev/net-next/c/ec7309525a37
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html