From: Daniel Golle <daniel@makrotopia.org>
To: Daniel Golle <daniel@makrotopia.org>,
Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next] net: dsa: mxl862xx: rename MDIO op arguments
Date: Tue, 3 Mar 2026 03:17:43 +0000 [thread overview]
Message-ID: <e1f4cb3bcffc7df9af0f2c9b673b14c7e1201c9a.1772507674.git.daniel@makrotopia.org> (raw)
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
next reply other threads:[~2026-03-03 3:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 3:17 Daniel Golle [this message]
2026-03-03 13:43 ` Andrew Lunn
2026-03-05 1:01 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e1f4cb3bcffc7df9af0f2c9b673b14c7e1201c9a.1772507674.git.daniel@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®