Search Linux Wireless

[PATCH] iwlegacy: 4965-rs: remove three unused variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux