mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
31 lines
1.1 KiB
Diff
31 lines
1.1 KiB
Diff
|
From e4a3e9ff5ba9f6b67595ec2768ed4be2054c2aa5 Mon Sep 17 00:00:00 2001
|
||
|
From: YueHaibing <yuehaibing@huawei.com>
|
||
|
Date: Thu, 22 Nov 2018 14:42:00 +0800
|
||
|
Subject: [PATCH] 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>
|
||
|
---
|
||
|
drivers/net/ethernet/marvell/mvneta.c | 3 +--
|
||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||
|
|
||
|
--- a/drivers/net/ethernet/marvell/mvneta.c
|
||
|
+++ b/drivers/net/ethernet/marvell/mvneta.c
|
||
|
@@ -4253,8 +4253,7 @@ static int mvneta_ethtool_set_eee(struct
|
||
|
|
||
|
/* 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);
|