diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-03-18 02:20:35 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-03-18 22:18:41 +0100 |
commit | 79fdce0513aceff7666e2e4dfa8fc28ea381d3a7 (patch) | |
tree | 72a1b42ec8e7517ce90cae6a8aa0b01308a824f8 /drivers/net/ethernet/qlogic/qlcnic | |
parent | atl1c: remove redundant assignment to variable size (diff) | |
download | linux-79fdce0513aceff7666e2e4dfa8fc28ea381d3a7.tar.xz linux-79fdce0513aceff7666e2e4dfa8fc28ea381d3a7.zip |
qlcnic: remove redundant assignment to variable index
Variable index is being assigned a value that is never read, it is being
re-assigned later in a following for-loop. The assignment is redundant
and can be removed.
Cleans up clang scan build warning:
drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c:1358:17: warning:
Although the value stored to 'index' is used in the enclosing expression,
the value is never actually read from 'index' [deadcode.DeadStores]
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220318012035.89482-1-colin.i.king@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/qlogic/qlcnic')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c index e10fe071a40f..54a2d653be63 100644 --- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c +++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ethtool.c @@ -1355,7 +1355,7 @@ static void qlcnic_get_ethtool_stats(struct net_device *dev, memset(data, 0, stats->n_stats * sizeof(u64)); - for (ring = 0, index = 0; ring < adapter->drv_tx_rings; ring++) { + for (ring = 0; ring < adapter->drv_tx_rings; ring++) { if (adapter->is_up == QLCNIC_ADAPTER_UP_MAGIC) { tx_ring = &adapter->tx_ring[ring]; data = qlcnic_fill_tx_queue_stats(data, tx_ring); |