[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181122064200.11572-1-yuehaibing@huawei.com>
Date: Thu, 22 Nov 2018 14:42:00 +0800
From: YueHaibing <yuehaibing@...wei.com>
To: <davem@...emloft.net>, <thomas.petazzoni@...tlin.com>
CC: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
YueHaibing <yuehaibing@...wei.com>
Subject: [PATCH net-next] 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@...wei.com>
---
drivers/net/ethernet/marvell/mvneta.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
index e5397c8..46a0f6b 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);
--
2.7.0
Powered by blists - more mailing lists