diff options
author | YueHaibing <yuehaibing@huawei.com> | 2018-11-22 09:42:00 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-24 04:17:09 +0300 |
commit | e4a3e9ff5ba9f6b67595ec2768ed4be2054c2aa5 (patch) | |
tree | fc1a62ad8a3acd0b0b2509ec40bd44196d2ade35 /drivers/net/ethernet/marvell/mvneta.c | |
parent | 9af8009082c73492c24a46494c1a29b506b3ad86 (diff) | |
download | linux-e4a3e9ff5ba9f6b67595ec2768ed4be2054c2aa5.tar.xz |
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: YueHaibing <yuehaibing@huawei.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvneta.c')
-rw-r--r-- | drivers/net/ethernet/marvell/mvneta.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index e5397c8197b9..46a0f6b45d84 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -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 * it being an 8-bit register. */ - if (eee->tx_lpi_enabled && - (eee->tx_lpi_timer < 0 || eee->tx_lpi_timer > 255)) + if (eee->tx_lpi_enabled && eee->tx_lpi_timer > 255) return -EINVAL; lpi_ctl0 = mvreg_read(pp, MVNETA_LPI_CTRL_0); |