Message ID | 20200919020550.23227-1-zhengyongjun3@huawei.com |
---|---|
State | New |
Headers | show |
Series | [net-next] net: marvell: Remove set but not used variable | expand |
From: Zheng Yongjun <zhengyongjun3@huawei.com> Date: Sat, 19 Sep 2020 10:05:50 +0800 > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/ethernet/marvell/pxa168_eth.c: In function pxa168_eth_change_mtu: > drivers/net/ethernet/marvell/pxa168_eth.c:1190:6: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable] > > `retval` is never used, so remove it. > > Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> This change is already in the net-next GIT tree.
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c index eb8cf60ecf12..0af31ec5dc7d 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;
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/marvell/pxa168_eth.c: In function pxa168_eth_change_mtu: drivers/net/ethernet/marvell/pxa168_eth.c:1190:6: warning: variable ‘retval’ set but not used [-Wunused-but-set-variable] `retval` is never used, so remove it. Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> --- drivers/net/ethernet/marvell/pxa168_eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)