* [PATCH v3] net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get()
@ 2023-03-08 13:04 Geert Uytterhoeven
2023-03-09 13:32 ` Simon Horman
2023-03-10 7:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2023-03-08 13:04 UTC (permalink / raw)
To: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Geert Uytterhoeven, Siddharth Vadapalli
Use the new devm_of_phy_optional_get() helper instead of open-coding the
same operation.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
---
v3:
- Add Reviewed-by,
v2:
- Rebase on top of commit 854617f52ab42418 ("net: ethernet: ti:
am65-cpsw: Handle -EPROBE_DEFER for Serdes PHY") in net-next
(next-20230123 and later).
---
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index 4e3861c47708c9e2..25996826edabc019 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -1470,11 +1470,9 @@ static int am65_cpsw_init_serdes_phy(struct device *dev, struct device_node *por
struct phy *phy;
int ret;
- phy = devm_of_phy_get(dev, port_np, name);
- if (PTR_ERR(phy) == -ENODEV)
- return 0;
- if (IS_ERR(phy))
- return PTR_ERR(phy);
+ phy = devm_of_phy_optional_get(dev, port_np, name);
+ if (IS_ERR_OR_NULL(phy))
+ return PTR_ERR_OR_ZERO(phy);
/* Serdes PHY exists. Store it. */
port->slave.serdes_phy = phy;
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get()
2023-03-08 13:04 [PATCH v3] net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get() Geert Uytterhoeven
@ 2023-03-09 13:32 ` Simon Horman
2023-03-10 7:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2023-03-09 13:32 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
netdev, linux-kernel, Siddharth Vadapalli
On Wed, Mar 08, 2023 at 02:04:52PM +0100, Geert Uytterhoeven wrote:
> Use the new devm_of_phy_optional_get() helper instead of open-coding the
> same operation.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get()
2023-03-08 13:04 [PATCH v3] net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get() Geert Uytterhoeven
2023-03-09 13:32 ` Simon Horman
@ 2023-03-10 7:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-10 7:30 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: davem, edumazet, kuba, pabeni, netdev, linux-kernel, s-vadapalli
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 8 Mar 2023 14:04:52 +0100 you wrote:
> Use the new devm_of_phy_optional_get() helper instead of open-coding the
> same operation.
>
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
> ---
> v3:
> - Add Reviewed-by,
>
> [...]
Here is the summary with links:
- [v3] net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get()
https://git.kernel.org/netdev/net-next/c/b3a8df9f27c0
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:[~2023-03-10 7:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-08 13:04 [PATCH v3] net: ethernet: ti: am65-cpsw: Convert to devm_of_phy_optional_get() Geert Uytterhoeven
2023-03-09 13:32 ` Simon Horman
2023-03-10 7:30 ` 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