linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>
To: <kvalo@kernel.org>, <davem@davemloft.net>, <stf_xl@wp.pl>
Cc: <linux-wireless@vger.kernel.org>, <netdev@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	Alexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>
Subject: [PATCH] iwlegacy: 4965-rs: remove three unused variables
Date: Fri, 18 Mar 2022 04:00:25 +0100	[thread overview]
Message-ID: <20220318030025.12890-1-alexander.vorwerk@stud.uni-goettingen.de> (raw)

The following warnings showed up when compiling with W=1.

drivers/net/wireless/intel/iwlegacy/4965-rs.c: In function ‘il4965_rs_stay_in_table’:
drivers/net/wireless/intel/iwlegacy/4965-rs.c:1636:18: warning: variable ‘il’ set but not used [-Wunused-but-set-variable]
  struct il_priv *il;
                  ^~
drivers/net/wireless/intel/iwlegacy/4965-rs.c: In function ‘il4965_rs_alloc_sta’:
drivers/net/wireless/intel/iwlegacy/4965-rs.c:2257:18: warning: variable ‘il’ set but not used [-Wunused-but-set-variable]
  struct il_priv *il;
                  ^~
drivers/net/wireless/intel/iwlegacy/4965-rs.c: In function ‘il4965_rs_sta_dbgfs_scale_table_write’:
drivers/net/wireless/intel/iwlegacy/4965-rs.c:2535:18: warning: variable ‘il’ set but not used [-Wunused-but-set-variable]
  struct il_priv *il;
                  ^~

Fixing by removing the variables.

Signed-off-by: Alexander Vorwerk <alexander.vorwerk@stud.uni-goettingen.de>
---
 drivers/net/wireless/intel/iwlegacy/4965-rs.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/wireless/intel/iwlegacy/4965-rs.c b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
index 9a491e5db75b..5e4110a1e644 100644
--- a/drivers/net/wireless/intel/iwlegacy/4965-rs.c
+++ b/drivers/net/wireless/intel/iwlegacy/4965-rs.c
@@ -1633,9 +1633,7 @@ il4965_rs_stay_in_table(struct il_lq_sta *lq_sta, bool force_search)
 	int i;
 	int active_tbl;
 	int flush_interval_passed = 0;
-	struct il_priv *il;
 
-	il = lq_sta->drv;
 	active_tbl = lq_sta->active_tbl;
 
 	tbl = &(lq_sta->lq_info[active_tbl]);
@@ -2254,9 +2252,7 @@ il4965_rs_alloc_sta(void *il_rate, struct ieee80211_sta *sta, gfp_t gfp)
 {
 	struct il_station_priv *sta_priv =
 	    (struct il_station_priv *)sta->drv_priv;
-	struct il_priv *il;
 
-	il = (struct il_priv *)il_rate;
 	D_RATE("create station rate scale win\n");
 
 	return &sta_priv->lq_sta;
@@ -2532,12 +2528,10 @@ il4965_rs_sta_dbgfs_scale_table_write(struct file *file,
 				      size_t count, loff_t *ppos)
 {
 	struct il_lq_sta *lq_sta = file->private_data;
-	struct il_priv *il;
 	char buf[64];
 	size_t buf_size;
 	u32 parsed_rate;
 
-	il = lq_sta->drv;
 	memset(buf, 0, sizeof(buf));
 	buf_size = min(count, sizeof(buf) - 1);
 	if (copy_from_user(buf, user_buf, buf_size))
-- 
2.17.1


             reply	other threads:[~2022-03-18  3:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-18  3:00 Alexander Vorwerk [this message]
2022-04-06 11:38 ` [PATCH] iwlegacy: 4965-rs: remove three unused variables 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=20220318030025.12890-1-alexander.vorwerk@stud.uni-goettingen.de \
    --to=alexander.vorwerk@stud.uni-goettingen.de \
    --cc=davem@davemloft.net \
    --cc=kvalo@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stf_xl@wp.pl \
    /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).