* [PATCH net-next] net: dsa: mxl862xx: rename MDIO op arguments
@ 2026-03-03 3:17 Daniel Golle
2026-03-03 13:43 ` Andrew Lunn
2026-03-05 1:01 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Daniel Golle @ 2026-03-03 3:17 UTC (permalink / raw)
To: Daniel Golle, Andrew Lunn, Vladimir Oltean, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, netdev, linux-kernel
The use of the 'port' argument name for functions implementing the MDIO
bus operations is misleading as the port address isn't equal to the
PHY address.
Rename the MDIO operation argument name to match the prototypes of
mdiobus_write, mdiobus_read, mdiobus_c45_read and mdiobus_c45_write.
Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/dsa/mxl862xx/mxl862xx.c | 32 ++++++++++++++---------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/drivers/net/dsa/mxl862xx/mxl862xx.c b/drivers/net/dsa/mxl862xx/mxl862xx.c
index b1e2094b58165..8281c749967af 100644
--- a/drivers/net/dsa/mxl862xx/mxl862xx.c
+++ b/drivers/net/dsa/mxl862xx/mxl862xx.c
@@ -44,13 +44,13 @@ static enum dsa_tag_protocol mxl862xx_get_tag_protocol(struct dsa_switch *ds,
}
/* PHY access via firmware relay */
-static int mxl862xx_phy_read_mmd(struct mxl862xx_priv *priv, int port,
- int devadd, int reg)
+static int mxl862xx_phy_read_mmd(struct mxl862xx_priv *priv, int addr,
+ int devadd, int regnum)
{
struct mdio_relay_data param = {
- .phy = port,
+ .phy = addr,
.mmd = devadd,
- .reg = cpu_to_le16(reg),
+ .reg = cpu_to_le16(regnum),
};
int ret;
@@ -61,40 +61,40 @@ static int mxl862xx_phy_read_mmd(struct mxl862xx_priv *priv, int port,
return le16_to_cpu(param.data);
}
-static int mxl862xx_phy_write_mmd(struct mxl862xx_priv *priv, int port,
- int devadd, int reg, u16 data)
+static int mxl862xx_phy_write_mmd(struct mxl862xx_priv *priv, int addr,
+ int devadd, int regnum, u16 data)
{
struct mdio_relay_data param = {
- .phy = port,
+ .phy = addr,
.mmd = devadd,
- .reg = cpu_to_le16(reg),
+ .reg = cpu_to_le16(regnum),
.data = cpu_to_le16(data),
};
return MXL862XX_API_WRITE(priv, INT_GPHY_WRITE, param);
}
-static int mxl862xx_phy_read_mii_bus(struct mii_bus *bus, int port, int regnum)
+static int mxl862xx_phy_read_mii_bus(struct mii_bus *bus, int addr, int regnum)
{
- return mxl862xx_phy_read_mmd(bus->priv, port, 0, regnum);
+ return mxl862xx_phy_read_mmd(bus->priv, addr, 0, regnum);
}
-static int mxl862xx_phy_write_mii_bus(struct mii_bus *bus, int port,
+static int mxl862xx_phy_write_mii_bus(struct mii_bus *bus, int addr,
int regnum, u16 val)
{
- return mxl862xx_phy_write_mmd(bus->priv, port, 0, regnum, val);
+ return mxl862xx_phy_write_mmd(bus->priv, addr, 0, regnum, val);
}
-static int mxl862xx_phy_read_c45_mii_bus(struct mii_bus *bus, int port,
+static int mxl862xx_phy_read_c45_mii_bus(struct mii_bus *bus, int addr,
int devadd, int regnum)
{
- return mxl862xx_phy_read_mmd(bus->priv, port, devadd, regnum);
+ return mxl862xx_phy_read_mmd(bus->priv, addr, devadd, regnum);
}
-static int mxl862xx_phy_write_c45_mii_bus(struct mii_bus *bus, int port,
+static int mxl862xx_phy_write_c45_mii_bus(struct mii_bus *bus, int addr,
int devadd, int regnum, u16 val)
{
- return mxl862xx_phy_write_mmd(bus->priv, port, devadd, regnum, val);
+ return mxl862xx_phy_write_mmd(bus->priv, addr, devadd, regnum, val);
}
static int mxl862xx_wait_ready(struct dsa_switch *ds)
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next] net: dsa: mxl862xx: rename MDIO op arguments
2026-03-03 3:17 [PATCH net-next] net: dsa: mxl862xx: rename MDIO op arguments Daniel Golle
@ 2026-03-03 13:43 ` Andrew Lunn
2026-03-05 1:01 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2026-03-03 13:43 UTC (permalink / raw)
To: Daniel Golle
Cc: Vladimir Oltean, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, netdev, linux-kernel
On Tue, Mar 03, 2026 at 03:17:43AM +0000, Daniel Golle wrote:
> The use of the 'port' argument name for functions implementing the MDIO
> bus operations is misleading as the port address isn't equal to the
> PHY address.
>
> Rename the MDIO operation argument name to match the prototypes of
> mdiobus_write, mdiobus_read, mdiobus_c45_read and mdiobus_c45_write.
>
> Suggested-by: Vladimir Oltean <olteanv@gmail.com>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net-next] net: dsa: mxl862xx: rename MDIO op arguments
2026-03-03 3:17 [PATCH net-next] net: dsa: mxl862xx: rename MDIO op arguments Daniel Golle
2026-03-03 13:43 ` Andrew Lunn
@ 2026-03-05 1:01 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-05 1:01 UTC (permalink / raw)
To: Daniel Golle
Cc: andrew, olteanv, davem, edumazet, kuba, pabeni, netdev,
linux-kernel
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 3 Mar 2026 03:17:43 +0000 you wrote:
> The use of the 'port' argument name for functions implementing the MDIO
> bus operations is misleading as the port address isn't equal to the
> PHY address.
>
> Rename the MDIO operation argument name to match the prototypes of
> mdiobus_write, mdiobus_read, mdiobus_c45_read and mdiobus_c45_write.
>
> [...]
Here is the summary with links:
- [net-next] net: dsa: mxl862xx: rename MDIO op arguments
https://git.kernel.org/netdev/net-next/c/aefa52a28a36
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:[~2026-03-05 1:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-03 3:17 [PATCH net-next] net: dsa: mxl862xx: rename MDIO op arguments Daniel Golle
2026-03-03 13:43 ` Andrew Lunn
2026-03-05 1: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