linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: zhengbin <zhengbin13@huawei.com>
To: <stas.yakovlev@gmail.com>, <kvalo@codeaurora.org>,
	<davem@davemloft.net>, <linux-wireless@vger.kernel.org>,
	<netdev@vger.kernel.org>
Cc: <zhengbin13@huawei.com>
Subject: [PATCH -next 1/2] ipw2x00: remove set but not used variable 'reason'
Date: Sat, 16 Nov 2019 15:41:22 +0800	[thread overview]
Message-ID: <1573890083-33761-2-git-send-email-zhengbin13@huawei.com> (raw)
In-Reply-To: <1573890083-33761-1-git-send-email-zhengbin13@huawei.com>

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(-)

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:
--
2.7.4


  reply	other threads:[~2019-11-16  7:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-16  7:41 [PATCH -next 0/2] ipw2x00: remove some set but not used variables zhengbin
2019-11-16  7:41 ` zhengbin [this message]
2019-11-16  7:51   ` [PATCH -next 1/2] ipw2x00: remove set but not used variable 'reason' Kalle Valo
2019-11-20  7:34   ` Kalle Valo
2019-11-16  7:41 ` [PATCH -next 2/2] ipw2x00: remove set but not used variable 'force_update' zhengbin
2019-11-16  7:51   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1573890083-33761-2-git-send-email-zhengbin13@huawei.com \
    --to=zhengbin13@huawei.com \
    --cc=davem@davemloft.net \
    --cc=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stas.yakovlev@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).