Commit e4a3e9ff authored by YueHaibing's avatar YueHaibing Committed by David S. Miller

net: mvneta: remove redundant check for eee->tx_lpi_timer < 0

fixes the smatch warning:

drivers/net/ethernet/marvell/mvneta.c:4252 mvneta_ethtool_set_eee() warn:
 unsigned 'eee->tx_lpi_timer' is never less than zero.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Acked-by: default avatarThomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9af80090
...@@ -4248,8 +4248,7 @@ static int mvneta_ethtool_set_eee(struct net_device *dev, ...@@ -4248,8 +4248,7 @@ static int mvneta_ethtool_set_eee(struct net_device *dev,
/* The Armada 37x documents do not give limits for this other than /* The Armada 37x documents do not give limits for this other than
* it being an 8-bit register. */ * it being an 8-bit register. */
if (eee->tx_lpi_enabled && if (eee->tx_lpi_enabled && eee->tx_lpi_timer > 255)
(eee->tx_lpi_timer < 0 || eee->tx_lpi_timer > 255))
return -EINVAL; return -EINVAL;
lpi_ctl0 = mvreg_read(pp, MVNETA_LPI_CTRL_0); lpi_ctl0 = mvreg_read(pp, MVNETA_LPI_CTRL_0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment