diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2021-10-20 20:42:19 +0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-10-21 15:35:50 -0700 |
commit | ae77bdbc2fc63bdaa58b64ed06c51e4052631902 (patch) | |
tree | 167d847585947d21bd97fee6dad3f0e604749457 /drivers/net/ethernet/freescale/enetc | |
parent | 50af5969bb22bb8ea757f87934c2478715afa854 (diff) | |
download | linux-ae77bdbc2fc63bdaa58b64ed06c51e4052631902.tar.bz2 |
net: enetc: remove local "priv" variable in enetc_clean_tx_ring()
The "priv" variable is needed in the "check_writeback" scope since
commit d39823121911 ("enetc: add hardware timestamping support").
Since commit 7294380c5211 ("enetc: support PTP Sync packet one-step
timestamping"), we also need "priv" in the larger function scope.
So the local variable from the "if" block scope is not needed, and
actually shadows the other one. Delete it.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/freescale/enetc')
-rw-r--r-- | drivers/net/ethernet/freescale/enetc/enetc.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/enetc/enetc.c b/drivers/net/ethernet/freescale/enetc/enetc.c index 8e31fe15bf3c..082b94e482ce 100644 --- a/drivers/net/ethernet/freescale/enetc/enetc.c +++ b/drivers/net/ethernet/freescale/enetc/enetc.c @@ -813,10 +813,7 @@ static bool enetc_clean_tx_ring(struct enetc_bdr *tx_ring, int napi_budget) bool is_eof = tx_swbd->is_eof; if (unlikely(tx_swbd->check_wb)) { - struct enetc_ndev_priv *priv = netdev_priv(ndev); - union enetc_tx_bd *txbd; - - txbd = ENETC_TXBD(*tx_ring, i); + union enetc_tx_bd *txbd = ENETC_TXBD(*tx_ring, i); if (txbd->flags & ENETC_TXBD_FLAGS_W && tx_swbd->do_twostep_tstamp) { |