mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-22 05:44:31 +08:00
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>
This commit is contained in:
parent
9af8009082
commit
e4a3e9ff5b
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user