From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] qlcnic: remove set but not used variables 'cur_rings, max_hw_rings, tx_desc_info' Date: Wed, 28 Nov 2018 11:10:20 -0800 (PST) Message-ID: <20181128.111020.1484129828213212510.davem@davemloft.net> References: <20181128122939.28132-1-yuehaibing@huawei.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Shahed.Shaikh@cavium.com, manish.chopra@cavium.com, Dept-GELinuxNICDev@cavium.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org To: yuehaibing@huawei.com Return-path: In-Reply-To: <20181128122939.28132-1-yuehaibing@huawei.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: YueHaibing Date: Wed, 28 Nov 2018 20:29:39 +0800 > 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 > 34e8c406fda5 ("qlcnic: refactor Tx/SDS ring calculation and validation in driver.") > 'tx_desc_info' never used since commit > 95b3890ae39f ("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 Applied.