Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423971 > unrolled thread

[PATCH 1/5] net: qlcnic: don't set unused function argument

Started byArnd Bergmann <arnd@arndb.de>
First post2016-06-16 13:40 +0200
Last post2016-06-17 02:40 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/5] net: qlcnic: don't set unused function argument Arnd Bergmann <arnd@arndb.de> - 2016-06-16 13:40 +0200
    RE: [PATCH 1/5] net: qlcnic: don't set unused function argument Rajesh Borundia <rajesh.borundia@qlogic.com> - 2016-06-16 16:00 +0200
    Re: [PATCH 1/5] net: qlcnic: don't set unused function argument David Miller <davem@davemloft.net> - 2016-06-17 02:40 +0200

#1423971 — [PATCH 1/5] net: qlcnic: don't set unused function argument

FromArnd Bergmann <arnd@arndb.de>
Date2016-06-16 13:40 +0200
Subject[PATCH 1/5] net: qlcnic: don't set unused function argument
Message-ID<rKDOq-7Nv-19@gated-at.bofh.it>
We get a warning for qlcnic_83xx_get_mac_address when building with
"make W=1":

drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c: In function 'qlcnic_83xx_get_mac_address':
drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:2156:8: error: parameter 'function' set but not used [-Werror=unused-but-set-parameter]

Clearly this is harmless, but there is also no point for setting
the variable, so we can simply remove the assignment.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
index f9640d5ce6ba..bdbcd2b088a0 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
@@ -2159,7 +2159,6 @@ int qlcnic_83xx_get_mac_address(struct qlcnic_adapter *adapter, u8 *mac,
 	struct qlcnic_cmd_args cmd;
 	u32 mac_low, mac_high;
 
-	function = 0;
 	err = qlcnic_alloc_mbx_args(&cmd, adapter, QLCNIC_CMD_MAC_ADDRESS);
 	if (err)
 		return err;
-- 
2.9.0

[toc] | [next] | [standalone]


#1424095

FromRajesh Borundia <rajesh.borundia@qlogic.com>
Date2016-06-16 16:00 +0200
Message-ID<rKFZV-Cr-61@gated-at.bofh.it>
In reply to#1423971
>-----Original Message-----
>From: Arnd Bergmann [mailto:arnd@arndb.de]
>Sent: Thursday, June 16, 2016 5:08 PM
>To: Dept-GE Linux NIC Dev <Dept-GELinuxNICDev@qlogic.com>
>Cc: Arnd Bergmann <arnd@arndb.de>; David Miller
><davem@davemloft.net>; Rajesh Borundia <rajesh.borundia@qlogic.com>;
>netdev <netdev@vger.kernel.org>; linux-kernel <linux-
>kernel@vger.kernel.org>
>Subject: [PATCH 1/5] net: qlcnic: don't set unused function argument
>
>We get a warning for qlcnic_83xx_get_mac_address when building with
>"make W=1":
>
>drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c: In function
>'qlcnic_83xx_get_mac_address':
>drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:2156:8: error:
>parameter 'function' set but not used [-Werror=unused-but-set-parameter]
>
>Clearly this is harmless, but there is also no point for setting the variable, so
>we can simply remove the assignment.
>
>Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>---
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c | 1 -
> 1 file changed, 1 deletion(-)
>
>diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
>b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
>index f9640d5ce6ba..bdbcd2b088a0 100644
>--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
>+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c
>@@ -2159,7 +2159,6 @@ int qlcnic_83xx_get_mac_address(struct
>qlcnic_adapter *adapter, u8 *mac,
> 	struct qlcnic_cmd_args cmd;
> 	u32 mac_low, mac_high;
>
>-	function = 0;
> 	err = qlcnic_alloc_mbx_args(&cmd, adapter,
>QLCNIC_CMD_MAC_ADDRESS);
> 	if (err)
> 		return err;
>--
>2.9.0

Acked-by: Rajesh Borundia <rajesh.borundia@qlogic.com>

[toc] | [prev] | [next] | [standalone]


#1424559

FromDavid Miller <davem@davemloft.net>
Date2016-06-17 02:40 +0200
Message-ID<rKPZf-7Fj-25@gated-at.bofh.it>
In reply to#1423971
From: Arnd Bergmann <arnd@arndb.de>
Date: Thu, 16 Jun 2016 13:38:22 +0200

> We get a warning for qlcnic_83xx_get_mac_address when building with
> "make W=1":
> 
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c: In function 'qlcnic_83xx_get_mac_address':
> drivers/net/ethernet/qlogic/qlcnic/qlcnic_83xx_hw.c:2156:8: error: parameter 'function' set but not used [-Werror=unused-but-set-parameter]
> 
> Clearly this is harmless, but there is also no point for setting
> the variable, so we can simply remove the assignment.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Applied to net-next.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web