diff mbox series

[net-next] net: pxa168_eth: remove unused variable 'retval' int pxa168_eth_change_mtu()

Message ID 1600089552-22368-1-git-send-email-zhangchangzhong@huawei.com
State New
Headers show
Series [net-next] net: pxa168_eth: remove unused variable 'retval' int pxa168_eth_change_mtu() | expand

Commit Message

Zhang Changzhong Sept. 14, 2020, 1:19 p.m. UTC
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@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
---
 drivers/net/ethernet/marvell/pxa168_eth.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

David Miller Sept. 14, 2020, 8:43 p.m. UTC | #1
From: Zhang Changzhong <zhangchangzhong@huawei.com>

Date: Mon, 14 Sep 2020 21:19:12 +0800

> 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@huawei.com>

> Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>


Applied.
diff mbox series

Patch

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;