]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Tue, 2 Apr 2024 18:33:56 +0000 (20:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:35:51 +0000 (16:35 +0200)
commitf4d1fa512b2ab6bee5de1affdaeb5a2fd93e29a6
tree5751beb6e63d6ccaf8f42c68ed269a9bede78032
parent729ad2ac2a2cdc9f4a4bdfd40bfd276e6bc33924
net: dsa: sja1105: Fix parameters order in sja1110_pcs_mdio_write_c45()

commit c120209bce34c49dcaba32f15679574327d09f63 upstream.

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.

Found with cppcheck, funcArgOrderDifferent.

Fixes: ae271547bba6 ("net: dsa: sja1105: C45 only transactions for PCS")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Michael Walle <mwalle@kernel.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Link: https://lore.kernel.org/r/ff2a5af67361988b3581831f7bd1eddebfb4c48f.1712082763.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/dsa/sja1105/sja1105_mdio.c