net: realtek: Remove set but not used variable
authorZheng Yongjun <zhengyongjun3@huawei.com>
Mon, 21 Sep 2020 13:32:09 +0000 (21:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Sep 2020 20:20:29 +0000 (13:20 -0700)
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/realtek/8139cp.c: In function cp_tx_timeout:
drivers/net/ethernet/realtek/8139cp.c:1242:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]

`rc` is never used, so remove it.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/8139cp.c

index e291e6a..4e44313 100644 (file)
@@ -1239,7 +1239,7 @@ static void cp_tx_timeout(struct net_device *dev, unsigned int txqueue)
 {
        struct cp_private *cp = netdev_priv(dev);
        unsigned long flags;
-       int rc, i;
+       int i;
 
        netdev_warn(dev, "Transmit timeout, status %2x %4x %4x %4x\n",
                    cpr8(Cmd), cpr16(CpCmd),
@@ -1260,7 +1260,7 @@ static void cp_tx_timeout(struct net_device *dev, unsigned int txqueue)
 
        cp_stop_hw(cp);
        cp_clean_rings(cp);
-       rc = cp_init_rings(cp);
+       cp_init_rings(cp);
        cp_start_hw(cp);
        __cp_set_rx_mode(dev);
        cpw16_f(IntrMask, cp_norx_intr_mask);