]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
net: pch_gbe: Remove dead RINGFREE code
authorPaul Burton <paul.burton@mips.com>
Sat, 23 Jun 2018 03:17:50 +0000 (20:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Jun 2018 11:52:08 +0000 (20:52 +0900)
The pch_gbe driver includes some code which appears to be an attempt to
work around a problem with the pch_gbe_free_rx_resources &
pch_gbe_free_tx_resources functions that no longer exists. Remove the
code guarded by the never-defined RINGFREE preprocessor macro.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_ethtool.c

index a7bdb53790ff409317a7b7281973395bd0981c91..adaa0024adfed596b87c47ec08d9be94f1d0edb0 100644 (file)
@@ -349,25 +349,12 @@ static int pch_gbe_set_ringparam(struct net_device *netdev,
                err = pch_gbe_setup_tx_resources(adapter, adapter->tx_ring);
                if (err)
                        goto err_setup_tx;
-               /* save the new, restore the old in order to free it,
-                * then restore the new back again */
-#ifdef RINGFREE
-               adapter->rx_ring = rx_old;
-               adapter->tx_ring = tx_old;
-               pch_gbe_free_rx_resources(adapter, adapter->rx_ring);
-               pch_gbe_free_tx_resources(adapter, adapter->tx_ring);
-               kfree(tx_old);
-               kfree(rx_old);
-               adapter->rx_ring = rxdr;
-               adapter->tx_ring = txdr;
-#else
                pch_gbe_free_rx_resources(adapter, rx_old);
                pch_gbe_free_tx_resources(adapter, tx_old);
                kfree(tx_old);
                kfree(rx_old);
                adapter->rx_ring = rxdr;
                adapter->tx_ring = txdr;
-#endif
                err = pch_gbe_up(adapter);
        }
        return err;