* [PATCH net-next] net: marvell: Remove set but not used variable
@ 2020-09-19 2:05 Zheng Yongjun
2020-09-19 21:14 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Zheng Yongjun @ 2020-09-19 2:05 UTC (permalink / raw)
To: davem, kuba, netdev, linux-kernel; +Cc: Zheng Yongjun
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(-)
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;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: marvell: Remove set but not used variable
2020-09-19 2:05 [PATCH net-next] net: marvell: Remove set but not used variable Zheng Yongjun
@ 2020-09-19 21:14 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-09-19 21:14 UTC (permalink / raw)
To: zhengyongjun3; +Cc: kuba, netdev, linux-kernel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-19 21:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 2:05 [PATCH net-next] net: marvell: Remove set but not used variable Zheng Yongjun
2020-09-19 21:14 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).