linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] qlcnic: remove set but not used variables 'op, cmd_op'
@ 2018-12-17  9:27 YueHaibing
  2018-12-18 23:50 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2018-12-17  9:27 UTC (permalink / raw)
  To: davem, Shahed.Shaikh, manish.chopra, Dept-GELinuxNICDev
  Cc: linux-kernel, netdev, YueHaibing

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

drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c:1070:5: warning:
 variable 'op' set but not used [-Wunused-but-set-variable]
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c:1342:5: warning:
 variable 'cmd_op' set but not used [-Wunused-but-set-variable]

'op' never used since introduction in commit 7cb03b2347d5 ("qlcnic:
Support VF-PF communication channel commands.")
'cmd_op' not used since commit 6226204bcf20 ("qlcnic: Fix operation
type and command type.")

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
index 50eaafa..af3b037 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c
@@ -1067,9 +1067,6 @@ static int qlcnic_sriov_pf_cfg_ip_cmd(struct qlcnic_bc_trans *trans,
 	struct qlcnic_vf_info *vf = trans->vf;
 	struct qlcnic_adapter *adapter = vf->adapter;
 	int err = -EIO;
-	u8 op;
-
-	op =  cmd->req.arg[1] & 0xff;
 
 	cmd->req.arg[1] |= vf->vp->handle << 16;
 	cmd->req.arg[1] |= BIT_31;
@@ -1339,14 +1336,13 @@ static int qlcnic_sriov_pf_get_acl_cmd(struct qlcnic_bc_trans *trans,
 {
 	struct qlcnic_vf_info *vf = trans->vf;
 	struct qlcnic_vport *vp = vf->vp;
-	u8 cmd_op, mode = vp->vlan_mode;
+	u8 mode = vp->vlan_mode;
 	struct qlcnic_adapter *adapter;
 	struct qlcnic_sriov *sriov;
 
 	adapter = vf->adapter;
 	sriov = adapter->ahw->sriov;
 
-	cmd_op = trans->req_hdr->cmd_op;
 	cmd->rsp.arg[0] |= 1 << 25;
 
 	/* For 84xx adapter in case of PVID , PFD should send vlan mode as
-- 
2.7.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] qlcnic: remove set but not used variables 'op, cmd_op'
  2018-12-17  9:27 [PATCH net-next] qlcnic: remove set but not used variables 'op, cmd_op' YueHaibing
@ 2018-12-18 23:50 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-12-18 23:50 UTC (permalink / raw)
  To: yuehaibing
  Cc: Shahed.Shaikh, manish.chopra, Dept-GELinuxNICDev, linux-kernel, netdev

From: YueHaibing <yuehaibing@huawei.com>
Date: Mon, 17 Dec 2018 17:27:16 +0800

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c:1070:5: warning:
>  variable 'op' set but not used [-Wunused-but-set-variable]
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c:1342:5: warning:
>  variable 'cmd_op' set but not used [-Wunused-but-set-variable]
> 
> 'op' never used since introduction in commit 7cb03b2347d5 ("qlcnic:
> Support VF-PF communication channel commands.")
> 'cmd_op' not used since commit 6226204bcf20 ("qlcnic: Fix operation
> type and command type.")
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-12-18 23:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-17  9:27 [PATCH net-next] qlcnic: remove set but not used variables 'op, cmd_op' YueHaibing
2018-12-18 23:50 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).