[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1600089552-22368-1-git-send-email-zhangchangzhong@huawei.com>
Date: Mon, 14 Sep 2020 21:19:12 +0800
From: Zhang Changzhong <zhangchangzhong@...wei.com>
To: <davem@...emloft.net>, <kuba@...nel.org>
CC: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH net-next] net: pxa168_eth: remove unused variable 'retval' int pxa168_eth_change_mtu()
Fixes the following W=1 kernel build warning(s):
drivers/net/ethernet/marvell/pxa168_eth.c:1190:6: warning:
variable 'retval' set but not used [-Wunused-but-set-variable]
1190 | int retval;
| ^~~~~~
Function pxa168_eth_change_mtu() always return zero, so variable 'retval'
is redundant, just remove it.
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@...wei.com>
---
drivers/net/ethernet/marvell/pxa168_eth.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index faac94b..d1e4d42 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1187,11 +1187,10 @@ static int pxa168_eth_stop(struct net_device *dev)
static int pxa168_eth_change_mtu(struct net_device *dev, int mtu)
{
- int retval;
struct pxa168_eth_private *pep = netdev_priv(dev);
dev->mtu = mtu;
- retval = set_port_config_ext(pep);
+ set_port_config_ext(pep);
if (!netif_running(dev))
return 0;
--
2.9.5
Powered by blists - more mailing lists