netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: pcs: xpcs: Use devm_clk_get_optional
@ 2025-07-15  2:19 Jack Ping CHNG
  2025-07-15 16:15 ` Andrew Lunn
  2025-07-17 10:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Jack Ping CHNG @ 2025-07-15  2:19 UTC (permalink / raw)
  To: netdev; +Cc: davem, fancer.lancer, yzhu, sureshnagaraj, Jack Ping CHNG

Synopsys DesignWare XPCS CSR clock is optional,
so it is better to use devm_clk_get_optional
instead of devm_clk_get.

Signed-off-by: Jack Ping CHNG <jchng@maxlinear.com>
---
v2:
  - indicate net-next in the subject line
v1: https://lore.kernel.org/netdev/20250714022348.2147396-1-jchng@maxlinear.com/
---
 drivers/net/pcs/pcs-xpcs-plat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/pcs/pcs-xpcs-plat.c b/drivers/net/pcs/pcs-xpcs-plat.c
index 629315f1e57c..137d91038fb4 100644
--- a/drivers/net/pcs/pcs-xpcs-plat.c
+++ b/drivers/net/pcs/pcs-xpcs-plat.c
@@ -280,7 +280,7 @@ static int xpcs_plat_init_clk(struct dw_xpcs_plat *pxpcs)
 	struct device *dev = &pxpcs->pdev->dev;
 	int ret;
 
-	pxpcs->cclk = devm_clk_get(dev, "csr");
+	pxpcs->cclk = devm_clk_get_optional(dev, "csr");
 	if (IS_ERR(pxpcs->cclk))
 		return dev_err_probe(dev, PTR_ERR(pxpcs->cclk),
 				     "Failed to get CSR clock\n");
-- 
2.43.0


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

* Re: [PATCH net-next v2] net: pcs: xpcs: Use devm_clk_get_optional
  2025-07-15  2:19 [PATCH net-next v2] net: pcs: xpcs: Use devm_clk_get_optional Jack Ping CHNG
@ 2025-07-15 16:15 ` Andrew Lunn
  2025-07-17 10:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2025-07-15 16:15 UTC (permalink / raw)
  To: Jack Ping CHNG; +Cc: netdev, davem, fancer.lancer, yzhu, sureshnagaraj

On Tue, Jul 15, 2025 at 10:19:56AM +0800, Jack Ping CHNG wrote:
> Synopsys DesignWare XPCS CSR clock is optional,
> so it is better to use devm_clk_get_optional
> instead of devm_clk_get.
> 
> Signed-off-by: Jack Ping CHNG <jchng@maxlinear.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next v2] net: pcs: xpcs: Use devm_clk_get_optional
  2025-07-15  2:19 [PATCH net-next v2] net: pcs: xpcs: Use devm_clk_get_optional Jack Ping CHNG
  2025-07-15 16:15 ` Andrew Lunn
@ 2025-07-17 10:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-07-17 10:40 UTC (permalink / raw)
  To: Jack Ping Chng; +Cc: netdev, davem, fancer.lancer, yzhu, sureshnagaraj

Hello:

This patch was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 15 Jul 2025 10:19:56 +0800 you wrote:
> Synopsys DesignWare XPCS CSR clock is optional,
> so it is better to use devm_clk_get_optional
> instead of devm_clk_get.
> 
> Signed-off-by: Jack Ping CHNG <jchng@maxlinear.com>
> ---
> v2:
>   - indicate net-next in the subject line
> v1: https://lore.kernel.org/netdev/20250714022348.2147396-1-jchng@maxlinear.com/
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: pcs: xpcs: Use devm_clk_get_optional
    https://git.kernel.org/netdev/net-next/c/8a2a6bb01664

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-07-17 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-15  2:19 [PATCH net-next v2] net: pcs: xpcs: Use devm_clk_get_optional Jack Ping CHNG
2025-07-15 16:15 ` Andrew Lunn
2025-07-17 10: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).