aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGravatar Vladimir Oltean <vladimir.oltean@nxp.com> 2024-05-13 14:53:45 +0300
committerGravatar Jakub Kicinski <kuba@kernel.org> 2024-05-13 16:37:18 -0700
commitafd29f36aaf733985df1ba162424581b8b8853b4 (patch)
tree43bc28e2512bcb4617b2f44ee036cd515a323090 /drivers
parentMerge branch 'mlx5-misc-patches' (diff)
downloadlinux-afd29f36aaf733985df1ba162424581b8b8853b4.tar.gz
linux-afd29f36aaf733985df1ba162424581b8b8853b4.tar.bz2
linux-afd29f36aaf733985df1ba162424581b8b8853b4.zip
net: pcs: lynx: no need to read LPA in lynx_pcs_get_state_2500basex()
Nothing useful is done with the LPA variable in lynx_pcs_get_state_2500basex(), we can just remove the read. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20240513115345.2452799-1-vladimir.oltean@nxp.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/pcs/pcs-lynx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/pcs/pcs-lynx.c b/drivers/net/pcs/pcs-lynx.c
index 853b8c138718..b79aedad855b 100644
--- a/drivers/net/pcs/pcs-lynx.c
+++ b/drivers/net/pcs/pcs-lynx.c
@@ -61,11 +61,10 @@ static void lynx_pcs_get_state_usxgmii(struct mdio_device *pcs,
static void lynx_pcs_get_state_2500basex(struct mdio_device *pcs,
struct phylink_link_state *state)
{
- int bmsr, lpa;
+ int bmsr;
bmsr = mdiodev_read(pcs, MII_BMSR);
- lpa = mdiodev_read(pcs, MII_LPA);
- if (bmsr < 0 || lpa < 0) {
+ if (bmsr < 0) {
state->link = false;
return;
}