netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] bnx2x: Remove set but not used variable 'mfw_vn'
@ 2019-02-18 12:19 YueHaibing
  2019-02-18 14:40 ` Sudarsana Reddy Kalluru
  2019-02-19  0:48 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2019-02-18 12:19 UTC (permalink / raw)
  To: Ariel Elior, Sudarsana Kalluru, David S . Miller
  Cc: YueHaibing, GR-everest-linux-l2, netdev, kernel-janitors

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

drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c: In function 'bnx2x_get_hwinfo':
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:11940:10: warning:
 variable 'mfw_vn' set but not used [-Wunused-but-set-variable]

It's never used since introduction.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
index 3b5b47e98c73..7c47be215a34 100644
--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
@@ -11998,7 +11998,7 @@ static void validate_set_si_mode(struct bnx2x *bp)
 static int bnx2x_get_hwinfo(struct bnx2x *bp)
 {
 	int /*abs*/func = BP_ABS_FUNC(bp);
-	int vn, mfw_vn;
+	int vn;
 	u32 val = 0, val2 = 0;
 	int rc = 0;
 
@@ -12083,12 +12083,10 @@ static int bnx2x_get_hwinfo(struct bnx2x *bp)
 	/*
 	 * Initialize MF configuration
 	 */
-
 	bp->mf_ov = 0;
 	bp->mf_mode = 0;
 	bp->mf_sub_mode = 0;
 	vn = BP_VN(bp);
-	mfw_vn = BP_FW_MB_IDX(bp);
 
 	if (!CHIP_IS_E1(bp) && !BP_NOMCP(bp)) {
 		BNX2X_DEV_INFO("shmem2base 0x%x, size %d, mfcfg offset %d\n",




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

* RE: [PATCH net-next] bnx2x: Remove set but not used variable 'mfw_vn'
  2019-02-18 12:19 [PATCH net-next] bnx2x: Remove set but not used variable 'mfw_vn' YueHaibing
@ 2019-02-18 14:40 ` Sudarsana Reddy Kalluru
  2019-02-19  0:48 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Sudarsana Reddy Kalluru @ 2019-02-18 14:40 UTC (permalink / raw)
  To: YueHaibing, Ariel Elior, David S . Miller
  Cc: GR-everest-linux-l2, netdev, kernel-janitors

>-----Original Message-----
>From: YueHaibing [mailto:yuehaibing@huawei.com]
>Sent: 18 February 2019 17:50
>To: Ariel Elior <aelior@marvell.com>; Sudarsana Reddy Kalluru
><skalluru@marvell.com>; David S . Miller <davem@davemloft.net>
>Cc: YueHaibing <yuehaibing@huawei.com>; GR-everest-linux-l2 <GR-everest-
>linux-l2@marvell.com>; netdev@vger.kernel.org; kernel-
>janitors@vger.kernel.org
>Subject: [PATCH net-next] bnx2x: Remove set but not used variable 'mfw_vn'
>
>Fixes gcc '-Wunused-but-set-variable' warning:
>
>drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c: In function
>'bnx2x_get_hwinfo':
>drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:11940:10: warning:
> variable 'mfw_vn' set but not used [-Wunused-but-set-variable]
>
>It's never used since introduction.
>
>Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>---
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
>diff --git a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
>b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
>index 3b5b47e98c73..7c47be215a34 100644
>--- a/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
>+++ b/drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c
>@@ -11998,7 +11998,7 @@ static void validate_set_si_mode(struct bnx2x
>*bp)  static int bnx2x_get_hwinfo(struct bnx2x *bp)  {
> 	int /*abs*/func = BP_ABS_FUNC(bp);
>-	int vn, mfw_vn;
>+	int vn;
> 	u32 val = 0, val2 = 0;
> 	int rc = 0;
>
>@@ -12083,12 +12083,10 @@ static int bnx2x_get_hwinfo(struct bnx2x *bp)
> 	/*
> 	 * Initialize MF configuration
> 	 */
>-
> 	bp->mf_ov = 0;
> 	bp->mf_mode = 0;
> 	bp->mf_sub_mode = 0;
> 	vn = BP_VN(bp);
>-	mfw_vn = BP_FW_MB_IDX(bp);
>
> 	if (!CHIP_IS_E1(bp) && !BP_NOMCP(bp)) {
> 		BNX2X_DEV_INFO("shmem2base 0x%x, size %d, mfcfg offset
>%d\n",
>
>

Acked-by: Sudarsana Reddy Kalluru <skalluru@marvell.com>

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

* Re: [PATCH net-next] bnx2x: Remove set but not used variable 'mfw_vn'
  2019-02-18 12:19 [PATCH net-next] bnx2x: Remove set but not used variable 'mfw_vn' YueHaibing
  2019-02-18 14:40 ` Sudarsana Reddy Kalluru
@ 2019-02-19  0:48 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-02-19  0:48 UTC (permalink / raw)
  To: yuehaibing; +Cc: aelior, skalluru, GR-everest-linux-l2, netdev, kernel-janitors

From: YueHaibing <yuehaibing@huawei.com>
Date: Mon, 18 Feb 2019 12:19:54 +0000

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c: In function 'bnx2x_get_hwinfo':
> drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c:11940:10: warning:
>  variable 'mfw_vn' set but not used [-Wunused-but-set-variable]
> 
> It's never used since introduction.
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>

Applied, thanks.

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

end of thread, other threads:[~2019-02-19  0:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-18 12:19 [PATCH net-next] bnx2x: Remove set but not used variable 'mfw_vn' YueHaibing
2019-02-18 14:40 ` Sudarsana Reddy Kalluru
2019-02-19  0:48 ` 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).