From: "Michael Walle" <mwalle@kernel.org>
To: "Christophe JAILLET" <christophe.jaillet@wanadoo.fr>,
"Vladimir Oltean" <olteanv@gmail.com>,
"Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>
Cc: <linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
<netdev@vger.kernel.org>
Subject: Re: [PATCH net] net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45()
Date: Wed, 03 Apr 2024 10:06:51 +0200 [thread overview]
Message-ID: <D0AC0465UQUJ.26171T9KETMCW@kernel.org> (raw)
In-Reply-To: <ff2a5af67361988b3581831f7bd1eddebfb4c48f.1712082763.git.christophe.jaillet@wanadoo.fr>
[-- Attachment #1: Type: text/plain, Size: 1831 bytes --]
On Tue Apr 2, 2024 at 8:33 PM CEST, Christophe JAILLET wrote:
> The definition and declaration of sja1110_pcs_mdio_write_c45() don't have
> parameters in the same order.
>
> Knowing that sja1110_pcs_mdio_write_c45() is used as a function pointer
> in 'sja1105_info' structure with .pcs_mdio_write_c45, and that we have:
>
> int (*pcs_mdio_write_c45)(struct mii_bus *bus, int phy, int mmd,
> int reg, u16 val);
>
> it is likely that the definition is the one to change.
See also "struct mii_bus":
/** @write_c45: Perform a C45 write transfer on the bus */
int (*write_c45)(struct mii_bus *bus, int addr, int devnum,
int regnum, u16 val);
>
> Found with cppcheck, funcArgOrderDifferent.
>
> Fixes: ae271547bba6 ("net: dsa: sja1105: C45 only transactions for PCS")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested only.
> ---
> drivers/net/dsa/sja1105/sja1105_mdio.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/dsa/sja1105/sja1105_mdio.c b/drivers/net/dsa/sja1105/sja1105_mdio.c
> index 833e55e4b961..52ddb4ef259e 100644
> --- a/drivers/net/dsa/sja1105/sja1105_mdio.c
> +++ b/drivers/net/dsa/sja1105/sja1105_mdio.c
> @@ -94,7 +94,7 @@ int sja1110_pcs_mdio_read_c45(struct mii_bus *bus, int phy, int mmd, int reg)
> return tmp & 0xffff;
> }
>
> -int sja1110_pcs_mdio_write_c45(struct mii_bus *bus, int phy, int reg, int mmd,
> +int sja1110_pcs_mdio_write_c45(struct mii_bus *bus, int phy, int mmd, int reg,
> u16 val)
Reviewed-by: Michael Walle <mwalle@kernel.org>
Vladimir, do you happen to know if some of your boards will use this
function? Just wondering because it was never noticed.
-michael
> {
> struct sja1105_mdio_private *mdio_priv = bus->priv;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]
next prev parent reply other threads:[~2024-04-03 8:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-02 18:33 [PATCH net] net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45() Christophe JAILLET
2024-04-03 8:06 ` Michael Walle [this message]
2024-04-03 11:11 ` Vladimir Oltean
2024-04-03 11:11 ` Vladimir Oltean
2024-04-04 11:20 ` 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=D0AC0465UQUJ.26171T9KETMCW@kernel.org \
--to=mwalle@kernel.org \
--cc=andrew@lunn.ch \
--cc=christophe.jaillet@wanadoo.fr \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--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