Skip to content

Commit

Permalink
net: pxa168_eth: remove unused variable 'retval' int pxa168_eth_chang…
Browse files Browse the repository at this point in the history
…e_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@huawei.com>
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Zhang Changzhong authored and David S. Miller committed Sep 14, 2020
1 parent 992bae7 commit f7ab0f0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/ethernet/marvell/pxa168_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f7ab0f0

Please sign in to comment.