Skip to content

Commit

Permalink
net: enetc: remove local "priv" variable in enetc_clean_tx_ring()
Browse files Browse the repository at this point in the history
The "priv" variable is needed in the "check_writeback" scope since
commit d398231 ("enetc: add hardware timestamping support").

Since commit 7294380 ("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>
  • Loading branch information
Vladimir Oltean authored and Jakub Kicinski committed Oct 21, 2021
1 parent 50af596 commit ae77bdb
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/ethernet/freescale/enetc/enetc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ae77bdb

Please sign in to comment.