* [PATCH net-next] net: ethernet: fs_enet: Make the per clock optional
@ 2024-09-14 8:18 Maxime Chevallier
2024-09-14 9:01 ` Christophe JAILLET
2024-09-15 16:01 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Maxime Chevallier @ 2024-09-14 8:18 UTC (permalink / raw)
To: davem, Pantelis Antoniou
Cc: Maxime Chevallier, netdev, linux-kernel, linuxppc-dev,
thomas.petazzoni, Andrew Lunn, Jakub Kicinski, Eric Dumazet,
Paolo Abeni, linux-arm-kernel, Christophe Leroy, Herve Codina,
Christophe JAILLET
Some platforms that use fs_enet don't have the PER register clock. This
optional dependency on the clock was incorrectly made mandatory when
switching to devm_ accessors.
Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Closes: https://lore.kernel.org/netdev/4e4defa9-ef2f-4ff1-95ca-6627c24db20c@wanadoo.fr/
Fixes: c614acf6e8e1 ("net: ethernet: fs_enet: simplify clock handling with devm accessors")
Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
---
This patch fixes a commit in net-next.
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
index d300b01859a1..3425c4a6abcb 100644
--- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
+++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
@@ -895,7 +895,7 @@ static int fs_enet_probe(struct platform_device *ofdev)
* but require enable to succeed when a clock was specified/found,
* keep a reference to the clock upon successful acquisition
*/
- clk = devm_clk_get_enabled(&ofdev->dev, "per");
+ clk = devm_clk_get_optional_enabled(&ofdev->dev, "per");
if (IS_ERR(clk))
goto out_free_fpi;
--
2.46.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ethernet: fs_enet: Make the per clock optional
2024-09-14 8:18 [PATCH net-next] net: ethernet: fs_enet: Make the per clock optional Maxime Chevallier
@ 2024-09-14 9:01 ` Christophe JAILLET
2024-09-15 16:01 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Christophe JAILLET @ 2024-09-14 9:01 UTC (permalink / raw)
To: Maxime Chevallier, davem, Pantelis Antoniou
Cc: netdev, linux-kernel, linuxppc-dev, thomas.petazzoni, Andrew Lunn,
Jakub Kicinski, Eric Dumazet, Paolo Abeni, linux-arm-kernel,
Christophe Leroy, Herve Codina
Le 14/09/2024 à 10:18, Maxime Chevallier a écrit :
> Some platforms that use fs_enet don't have the PER register clock. This
> optional dependency on the clock was incorrectly made mandatory when
> switching to devm_ accessors.
>
> Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Closes: https://lore.kernel.org/netdev/4e4defa9-ef2f-4ff1-95ca-6627c24db20c@wanadoo.fr/
> Fixes: c614acf6e8e1 ("net: ethernet: fs_enet: simplify clock handling with devm accessors")
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
> ---
> This patch fixes a commit in net-next.
>
> drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> index d300b01859a1..3425c4a6abcb 100644
> --- a/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> +++ b/drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c
> @@ -895,7 +895,7 @@ static int fs_enet_probe(struct platform_device *ofdev)
> * but require enable to succeed when a clock was specified/found,
> * keep a reference to the clock upon successful acquisition
> */
> - clk = devm_clk_get_enabled(&ofdev->dev, "per");
> + clk = devm_clk_get_optional_enabled(&ofdev->dev, "per");
> if (IS_ERR(clk))
> goto out_free_fpi;
>
Reviewed-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: ethernet: fs_enet: Make the per clock optional
2024-09-14 8:18 [PATCH net-next] net: ethernet: fs_enet: Make the per clock optional Maxime Chevallier
2024-09-14 9:01 ` Christophe JAILLET
@ 2024-09-15 16:01 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-09-15 16:01 UTC (permalink / raw)
To: Maxime Chevallier
Cc: davem, pantelis.antoniou, netdev, linux-kernel, linuxppc-dev,
thomas.petazzoni, andrew, kuba, edumazet, pabeni,
linux-arm-kernel, christophe.leroy, herve.codina,
christophe.jaillet
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Sat, 14 Sep 2024 10:18:20 +0200 you wrote:
> Some platforms that use fs_enet don't have the PER register clock. This
> optional dependency on the clock was incorrectly made mandatory when
> switching to devm_ accessors.
>
> Reported-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> Closes: https://lore.kernel.org/netdev/4e4defa9-ef2f-4ff1-95ca-6627c24db20c@wanadoo.fr/
> Fixes: c614acf6e8e1 ("net: ethernet: fs_enet: simplify clock handling with devm accessors")
> Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
>
> [...]
Here is the summary with links:
- [net-next] net: ethernet: fs_enet: Make the per clock optional
https://git.kernel.org/netdev/net-next/c/c209847b8974
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:[~2024-09-15 16:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-14 8:18 [PATCH net-next] net: ethernet: fs_enet: Make the per clock optional Maxime Chevallier
2024-09-14 9:01 ` Christophe JAILLET
2024-09-15 16:01 ` 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