netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper
@ 2025-02-05 16:09 Geert Uytterhoeven
  2025-02-06 16:29 ` Simon Horman
  2025-02-07  1:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2025-02-05 16:09 UTC (permalink / raw)
  To: Clément Léger, Wolfram Sang, Andrew Lunn,
	Heiner Kallweit, Russell King, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-renesas-soc, Geert Uytterhoeven

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 <geert+renesas@glider.be>
---
 drivers/net/pcs/pcs-rzn1-miic.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/pcs/pcs-rzn1-miic.c b/drivers/net/pcs/pcs-rzn1-miic.c
index 74a1c28ffc014796..991f05a40c758ccd 100644
--- a/drivers/net/pcs/pcs-rzn1-miic.c
+++ b/drivers/net/pcs/pcs-rzn1-miic.c
@@ -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;
 	}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper
  2025-02-05 16:09 [PATCH net-next] net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper Geert Uytterhoeven
@ 2025-02-06 16:29 ` Simon Horman
  2025-02-07  1:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2025-02-06 16:29 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Clément Léger, Wolfram Sang, Andrew Lunn,
	Heiner Kallweit, Russell King, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-renesas-soc

On Wed, Feb 05, 2025 at 05:09:47PM +0100, Geert Uytterhoeven wrote:
> 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 <geert+renesas@glider.be>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next] net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper
  2025-02-05 16:09 [PATCH net-next] net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper Geert Uytterhoeven
  2025-02-06 16:29 ` Simon Horman
@ 2025-02-07  1:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-02-07  1:40 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: clement.leger, wsa+renesas, andrew, hkallweit1, linux, davem,
	edumazet, kuba, pabeni, netdev, linux-renesas-soc

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

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.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-07  1:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 16:09 [PATCH net-next] net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper Geert Uytterhoeven
2025-02-06 16:29 ` Simon Horman
2025-02-07  1:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).