提交 90e3f637 编写于 作者: P Paul Burton 提交者: David S. Miller

net: pch_gbe: Remove dead RINGFREE code

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: NPaul Burton <paul.burton@mips.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 41fd60fa
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册