diff mbox series

[-next,1/2] ipw2x00: remove set but not used variable 'reason'

Message ID 1573890083-33761-2-git-send-email-zhengbin13@huawei.com (mailing list archive)
State Accepted
Commit 805a57acd7b52e1ba0ad2649e33c585bba958633
Delegated to: Kalle Valo
Headers show
Series ipw2x00: remove some set but not used variables | expand

Commit Message

Zheng Bin Nov. 16, 2019, 7:41 a.m. UTC
Fixes gcc '-Wunused-but-set-variable' warning:

drivers/net/wireless/intel/ipw2x00/ipw2200.c: In function ipw_wx_set_mlme:
drivers/net/wireless/intel/ipw2x00/ipw2200.c:6805:9: warning: variable reason set but not used [-Wunused-but-set-variable]

It is introduced by commit 367a1092b555 ("ipw2x00:
move under intel vendor directory"), but never used, so remove it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: zhengbin <zhengbin13@huawei.com>
---
 drivers/net/wireless/intel/ipw2x00/ipw2200.c | 3 ---
 1 file changed, 3 deletions(-)

--
2.7.4

Comments

Kalle Valo Nov. 16, 2019, 7:51 a.m. UTC | #1
zhengbin <zhengbin13@huawei.com> writes:

> Fixes gcc '-Wunused-but-set-variable' warning:
>
> drivers/net/wireless/intel/ipw2x00/ipw2200.c: In function ipw_wx_set_mlme:
> drivers/net/wireless/intel/ipw2x00/ipw2200.c:6805:9: warning: variable reason set but not used [-Wunused-but-set-variable]
>
> It is introduced by commit 367a1092b555 ("ipw2x00:
> move under intel vendor directory"), but never used, so remove it.

No it's not, as the commit title says it's only moving files to a
different location. I'll remove that sentence from the commit log.
Kalle Valo Nov. 20, 2019, 7:34 a.m. UTC | #2
zhengbin <zhengbin13@huawei.com> wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/wireless/intel/ipw2x00/ipw2200.c: In function ipw_wx_set_mlme:
> drivers/net/wireless/intel/ipw2x00/ipw2200.c:6805:9: warning: variable reason set but not used [-Wunused-but-set-variable]
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: zhengbin <zhengbin13@huawei.com>

2 patches applied to wireless-drivers-next.git, thanks.

805a57acd7b5 ipw2x00: remove set but not used variable 'reason'
f89f1aefff5a ipw2x00: remove set but not used variable 'force_update'
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
index ed0f065..31e43fc 100644
--- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c
+++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c
@@ -6788,9 +6788,6 @@  static int ipw_wx_set_mlme(struct net_device *dev,
 {
 	struct ipw_priv *priv = libipw_priv(dev);
 	struct iw_mlme *mlme = (struct iw_mlme *)extra;
-	__le16 reason;
-
-	reason = cpu_to_le16(mlme->reason_code);

 	switch (mlme->cmd) {
 	case IW_MLME_DEAUTH: