net: dsa: rzn1_a5psw: add COMPILE_TEST
v2 cover net: dsa: rzn1_a5psw: add COMPILE_TEST
Allows the various bots to test compilation. Also threw in a small devm conversion for enabling clocks.
v2: fix depends on line to match rzn1 pcs driver.
Rosen Penev (2):
net: dsa: rzn1_a5psw: add COMPILE_TEST
net: dsa: rzn1_a5psw: use devm to enable clocks
drivers/net/dsa/Kconfig | 2 +- drivers/net/dsa/rzn1_a5psw.c | 22 ++++------------------ 2 files changed, 5 insertions(+), 19 deletions(-)
Signature · 1 line
2.50.0
PATCH v2 1/2 net: dsa: rzn1_a5psw: add COMPILE_TEST
There's no architecture specific requirement for it to compile. Allows the bots to test compilation properly.
--- drivers/net/dsa/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/dsa/Kconfig +1 -1
@@ -92,7 +92,7 @@ source "drivers/net/dsa/realtek/Kconfig" config NET_DSA_RZN1_A5PSW tristate "Renesas RZ/N1 A5PSW Ethernet switch support" - depends on OF && ARCH_RZN1 + depends on OF && (ARCH_RZN1 || COMPILE_TEST) select NET_DSA_TAG_RZN1_A5PSW select PCS_RZN1_MIIC help
Signature · 1 line
2.50.0
PATCH v2 2/2 net: dsa: rzn1_a5psw: use devm to enable clocks
In reply to Rosen PenevThe remove function has these in the wrong order. The switch should be unregistered last. Simpler to use devm so that the right thing is done.
--- drivers/net/dsa/rzn1_a5psw.c | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-)
drivers/net/dsa/rzn1_a5psw.c +4 -18
@@ -1227,35 +1227,27 @@ static int a5psw_probe(struct platform_device *pdev)if (ret)return ret; - a5psw->hclk =devm_clk_get (dev,"hclk" ); + a5psw->hclk =devm_clk_get_enabled (dev,"hclk" );if (IS_ERR (a5psw->hclk)) {dev_err (dev,"failed get hclk clock\n" ); ret =PTR_ERR (a5psw->hclk); goto free_pcs; } - a5psw->clk =devm_clk_get (dev,"clk" ); + a5psw->clk =devm_clk_get_enabled (dev,"clk" );if (IS_ERR (a5psw->clk)) {dev_err (dev,"failed get clk_switch clock\n" ); ret =PTR_ERR (a5psw->clk); goto free_pcs; } - ret =clk_prepare_enable (a5psw->clk); -if (ret) - goto free_pcs; - - ret =clk_prepare_enable (a5psw->hclk); -if (ret) - goto clk_disable; - mdio =of_get_available_child_by_name (dev->of_node,"mdio" );if (mdio) { ret =a5psw_probe_mdio (a5psw, mdio);of_node_put (mdio);if (ret) {dev_err (dev,"Failed to register MDIO: %d\n" , ret); - goto hclk_disable; + goto free_pcs; } }
@@ -1269,15 +1261,11 @@ static int a5psw_probe(struct platform_device *pdev) ret =dsa_register_switch (ds);if (ret) {dev_err (dev,"Failed to register DSA switch: %d\n" , ret); - goto hclk_disable; + goto free_pcs; }return 0 ; -hclk_disable: -clk_disable_unprepare (a5psw->hclk); -clk_disable: -clk_disable_unprepare (a5psw->clk); free_pcs:a5psw_pcs_free (a5psw);
@@ -1293,8 +1281,6 @@ static void a5psw_remove(struct platform_device *pdev)dsa_unregister_switch (&a5psw->ds);a5psw_pcs_free (a5psw); -clk_disable_unprepare (a5psw->hclk); -clk_disable_unprepare (a5psw->clk); }static void a5psw_shutdown (struct platform_device *pdev)
Signature · 1 line
2.50.0
This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 10 lines · On Mon, 7 Jul 2025 18:41:42 -0700 you wrote:
Allows the various bots to test compilation. Also threw in a small devm conversion for enabling clocks.
v2: fix depends on line to match rzn1 pcs driver.
Rosen Penev (2):
net: dsa:rzn1_a5psw: addCOMPILE_TEST
net: dsa:rzn1_a5psw: use devm to enable clocks[...]
Here is the summary with links:
- [PATCHv2,1/2] net: dsa: rzn1_a5psw: add COMPILE_TEST
https://git.kernel.org/netdev/net-next/c/f38ae0c62ec8 - [PATCHv2,2/2] net: dsa: rzn1_a5psw: use devm to enable clocks https://git.kernel.org/netdev/net-next/c/37bfeebc12a4
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html