diff options
author | Zhang Changzhong <zhangchangzhong@huawei.com> | 2020-09-19 04:26:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-20 23:17:59 +0200 |
commit | 098c2fc6d91d11bfa0d0b7db0b1b0a5a19a80867 (patch) | |
tree | 8c333d17a6c2f0b6152f36f5e473b27844abc4ef /drivers/net/ethernet/marvell/mvneta.c | |
parent | net: remove unnecessary NULL checking in napi_consume_skb() (diff) | |
download | linux-098c2fc6d91d11bfa0d0b7db0b1b0a5a19a80867.tar.xz linux-098c2fc6d91d11bfa0d0b7db0b1b0a5a19a80867.zip |
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: Zhang Changzhong <zhangchangzhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvneta.c')
-rw-r--r-- | drivers/net/ethernet/marvell/mvneta.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c index 2332a7fc9a59..e5ddefe5cade 100644 --- a/drivers/net/ethernet/marvell/mvneta.c +++ b/drivers/net/ethernet/marvell/mvneta.c @@ -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) { int i; - u32 dummy; /* Perform dummy reads from MIB counters */ for (i = 0; i < MVNETA_MIB_LATE_COLLISION; i += 4) - dummy = mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i)); - dummy = mvreg_read(pp, MVNETA_RX_DISCARD_FRAME_COUNT); - dummy = mvreg_read(pp, MVNETA_OVERRUN_FRAME_COUNT); + mvreg_read(pp, (MVNETA_MIB_COUNTERS_BASE + i)); + mvreg_read(pp, MVNETA_RX_DISCARD_FRAME_COUNT); + mvreg_read(pp, MVNETA_OVERRUN_FRAME_COUNT); } /* Get System Network Statistics */ |