Skip to contentSkip to conversation

net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper

PATCH Applied Geert Uytterhoeven 3 participants 3 messages Feb 5, 2025 – Feb 7, 2025

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

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.

---
 drivers/net/pcs/pcs-rzn1-miic.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/net/pcs/pcs-rzn1-miic.c +1 -4
index 74a1c28ffc014796..991f05a40c758ccd 100644
@@ -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
#2 lore raw
In reply to Geert Uytterhoeven
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 the for_each_available_child_of_node() helper instead of manually skipping unavailable child nodes.

---
 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