Commit 098c2fc6 authored by Zhang Changzhong's avatar Zhang Changzhong Committed by David S. Miller

net: mventa: remove unused variable 'dummy' in mvneta_mib_counters_clear()

Fixes the following W=1 kernel build warning(s):

drivers/net/ethernet/marvell/mvneta.c:754:6: warning:
 variable 'dummy' set but not used [-Wunused-but-set-variable]
  754 |  u32 dummy;
      |      ^~~~~

This variable is not used in function mvneta_mib_counters_clear(), so
remove it to avoid build warning.
Signed-off-by: default avatarZhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1f14bd99
...@@ -751,13 +751,12 @@ static void mvneta_txq_inc_put(struct mvneta_tx_queue *txq) ...@@ -751,13 +751,12 @@ static void mvneta_txq_inc_put(struct mvneta_tx_queue *txq)
static void mvneta_mib_counters_clear(struct mvneta_port *pp) static void mvneta_mib_counters_clear(struct mvneta_port *pp)
{ {
int i; int i;
u32 dummy;
/* Perform dummy reads from MIB counters */ /* Perform dummy reads from MIB counters */
for (i = 0; i < MVNETA_MIB_LATE_COLLISION; i += 4) for (i = 0; i < MVNETA_MIB_LATE_COLLISION; i += 4)
dummy = mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i)); mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i));
dummy = mvreg_read(pp, MVNETA_RX_DISCARD_FRAME_COUNT); mvreg_read(pp, MVNETA_RX_DISCARD_FRAME_COUNT);
dummy = mvreg_read(pp, MVNETA_OVERRUN_FRAME_COUNT); mvreg_read(pp, MVNETA_OVERRUN_FRAME_COUNT);
} }
/* Get System Network Statistics */ /* Get System Network Statistics */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment