* [PATCH net-next] net: phy: fixed_phy: simplify fixed_mdio_read
@ 2025-08-26 19:24 Heiner Kallweit
2025-08-27 15:14 ` Alexander Lobakin
2025-08-28 1:20 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Heiner Kallweit @ 2025-08-26 19:24 UTC (permalink / raw)
To: Andrew Lunn, Andrew Lunn, Russell King - ARM Linux,
Jakub Kicinski, Paolo Abeni, David Miller, Eric Dumazet
Cc: netdev@vger.kernel.org
swphy_read_reg() doesn't change the passed struct fixed_phy_status,
so we can pass &fp->status directly.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
drivers/net/phy/fixed_phy.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 616dff089..7015c763a 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -75,8 +75,6 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)
list_for_each_entry(fp, &fmb->phys, node) {
if (fp->addr == phy_addr) {
- struct fixed_phy_status state;
-
fp->status.link = !fp->no_carrier;
/* Issue callback if user registered it. */
@@ -86,9 +84,8 @@ static int fixed_mdio_read(struct mii_bus *bus, int phy_addr, int reg_num)
/* Check the GPIO for change in status */
fixed_phy_update(fp);
- state = fp->status;
- return swphy_read_reg(reg_num, &state);
+ return swphy_read_reg(reg_num, &fp->status);
}
}
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phy: fixed_phy: simplify fixed_mdio_read
2025-08-26 19:24 [PATCH net-next] net: phy: fixed_phy: simplify fixed_mdio_read Heiner Kallweit
@ 2025-08-27 15:14 ` Alexander Lobakin
2025-08-28 1:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Lobakin @ 2025-08-27 15:14 UTC (permalink / raw)
To: Heiner Kallweit
Cc: Andrew Lunn, Andrew Lunn, Russell King - ARM Linux,
Jakub Kicinski, Paolo Abeni, David Miller, Eric Dumazet,
netdev@vger.kernel.org
From: Heiner Kallweit <hkallweit1@gmail.com>
Date: Tue, 26 Aug 2025 21:24:44 +0200
> swphy_read_reg() doesn't change the passed struct fixed_phy_status,
> so we can pass &fp->status directly.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> ---
> drivers/net/phy/fixed_phy.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Thanks,
Olek
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: phy: fixed_phy: simplify fixed_mdio_read
2025-08-26 19:24 [PATCH net-next] net: phy: fixed_phy: simplify fixed_mdio_read Heiner Kallweit
2025-08-27 15:14 ` Alexander Lobakin
@ 2025-08-28 1:20 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-08-28 1:20 UTC (permalink / raw)
To: Heiner Kallweit
Cc: andrew, andrew+netdev, linux, kuba, pabeni, davem, edumazet,
netdev
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 26 Aug 2025 21:24:44 +0200 you wrote:
> swphy_read_reg() doesn't change the passed struct fixed_phy_status,
> so we can pass &fp->status directly.
>
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---
> drivers/net/phy/fixed_phy.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
Here is the summary with links:
- [net-next] net: phy: fixed_phy: simplify fixed_mdio_read
https://git.kernel.org/netdev/net-next/c/6aff3699906b
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-08-28 1:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-26 19:24 [PATCH net-next] net: phy: fixed_phy: simplify fixed_mdio_read Heiner Kallweit
2025-08-27 15:14 ` Alexander Lobakin
2025-08-28 1:20 ` 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).