Skip to content

Commit

Permalink
net: pcs: lynx: no need to read LPA in lynx_pcs_get_state_2500basex()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vladimir Oltean authored and Jakub Kicinski committed May 13, 2024
1 parent d20e391 commit afd29f3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/net/pcs/pcs-lynx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit afd29f3

Please sign in to comment.