diff options
author | DENG Qingfang <dengqf6@mail2.sysu.edu.cn> | 2020-03-04 20:46:10 +0800 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2020-04-13 22:41:37 +0200 |
commit | 70193703a9ef796be74e3afe963d5c463b8cbccc (patch) | |
tree | 9111a658f481984275dd90f75682df1d3d47d333 /target/linux/mvebu/patches-5.4/534-net-mvneta-remove-redundant-check-for.patch | |
parent | 85ef69b20299c2c4f42d6bfbfaf807358ebe2078 (diff) | |
download | upstream-70193703a9ef796be74e3afe963d5c463b8cbccc.tar.gz upstream-70193703a9ef796be74e3afe963d5c463b8cbccc.tar.bz2 upstream-70193703a9ef796be74e3afe963d5c463b8cbccc.zip |
mvebu: copy files and patches to 5.4
Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
Diffstat (limited to 'target/linux/mvebu/patches-5.4/534-net-mvneta-remove-redundant-check-for.patch')
-rw-r--r-- | target/linux/mvebu/patches-5.4/534-net-mvneta-remove-redundant-check-for.patch | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/mvebu/patches-5.4/534-net-mvneta-remove-redundant-check-for.patch b/target/linux/mvebu/patches-5.4/534-net-mvneta-remove-redundant-check-for.patch new file mode 100644 index 0000000000..fd774e0839 --- /dev/null +++ b/target/linux/mvebu/patches-5.4/534-net-mvneta-remove-redundant-check-for.patch @@ -0,0 +1,30 @@ +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 +@@ -4268,8 +4268,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); |