]> git.baikalelectronics.ru Git - kernel.git/commit
qlcnic: remove set but not used variables 'cur_rings, max_hw_rings, tx_desc_info'
authorYueHaibing <yuehaibing@huawei.com>
Wed, 28 Nov 2018 12:29:39 +0000 (20:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 28 Nov 2018 19:09:11 +0000 (11:09 -0800)
commitc6449cd66901dbdbc694f13fbb78e89e986acda3
tree70eb6b5137d45b499ad4d8bfa7b99f6829e48fac
parent0d163af64ecc9998e64e6520611dea0c8417f11a
qlcnic: remove set but not used variables 'cur_rings, max_hw_rings, tx_desc_info'

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:4011:5:
 warning: variable 'max_hw_rings' set but not used [-Wunused-but-set-variable]
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:4013:6:
 warning: variable 'cur_rings' set but not used [-Wunused-but-set-variable]
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c:2996:25:
 warning: variable 'tx_desc_info' set but not used [-Wunused-but-set-variable]

'cur_rings, max_hw_rings' never used since introduction in commit
669c6f3c1bc2 ("qlcnic: refactor Tx/SDS ring calculation and validation in driver.")
'tx_desc_info' never used since commit
31ff47950df9 ("qlcnic: Enhance Tx timeout debugging.")
Also 'queue_type' only can be QLCNIC_RX_QUEUE/QLCNIC_TX_QUEUE,
so make a trival cleanup on if statement.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Shahed Shaikh <shahed.shaikh@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c