netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] qed: Remove set but not used variable 'p_link'
@ 2020-02-04  2:24 YueHaibing
  2020-02-04  8:33 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: YueHaibing @ 2020-02-04  2:24 UTC (permalink / raw)
  To: Ariel Elior, Michal Kalderon, David S . Miller
  Cc: YueHaibing, GR-everest-linux-l2, netdev, linux-kernel,
	kernel-janitors, Hulk Robot

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

drivers/net/ethernet/qlogic/qed/qed_cxt.c: In function 'qed_qm_init_pf':
drivers/net/ethernet/qlogic/qed/qed_cxt.c:1401:29: warning:
 variable 'p_link' set but not used [-Wunused-but-set-variable]

commit 92fae6fb231f ("qed: FW 8.42.2.0 Queue Manager changes")
leave behind this unused variable.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/qlogic/qed/qed_cxt.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
index fbfff2b1dc93..1a636bad717d 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
@@ -1398,14 +1398,11 @@ void qed_qm_init_pf(struct qed_hwfn *p_hwfn,
 {
 	struct qed_qm_info *qm_info = &p_hwfn->qm_info;
 	struct qed_qm_pf_rt_init_params params;
-	struct qed_mcp_link_state *p_link;
 	struct qed_qm_iids iids;
 
 	memset(&iids, 0, sizeof(iids));
 	qed_cxt_qm_iids(p_hwfn, &iids);
 
-	p_link = &QED_LEADING_HWFN(p_hwfn->cdev)->mcp_info->link_output;
-
 	memset(&params, 0, sizeof(params));
 	params.port_id = p_hwfn->port_id;
 	params.pf_id = p_hwfn->rel_pf_id;




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

* Re: [PATCH net-next] qed: Remove set but not used variable 'p_link'
  2020-02-04  2:24 [PATCH net-next] qed: Remove set but not used variable 'p_link' YueHaibing
@ 2020-02-04  8:33 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-02-04  8:33 UTC (permalink / raw)
  To: yuehaibing
  Cc: aelior, michal.kalderon, GR-everest-linux-l2, netdev,
	linux-kernel, kernel-janitors, hulkci

From: YueHaibing <yuehaibing@huawei.com>
Date: Tue, 4 Feb 2020 02:24:41 +0000

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/qlogic/qed/qed_cxt.c: In function 'qed_qm_init_pf':
> drivers/net/ethernet/qlogic/qed/qed_cxt.c:1401:29: warning:
>  variable 'p_link' set but not used [-Wunused-but-set-variable]
> 
> commit 92fae6fb231f ("qed: FW 8.42.2.0 Queue Manager changes")
> leave behind this unused variable.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thank you.

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

end of thread, other threads:[~2020-02-04  8:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04  2:24 [PATCH net-next] qed: Remove set but not used variable 'p_link' YueHaibing
2020-02-04  8:33 ` 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).