Commit 454127ad authored by Colin Ian King's avatar Colin Ian King Committed by Kalle Valo

iwlegacy: remove several redundant variables

Variables id, unicast, write, conf, a_band, accum_tx and ucode are
assigned a value but it is never read, hence they are redundant and
can be removed.

Cleans up clang warnings:
warning: variable 'id' set but not used [-Wunused-but-set-variable]
warning: variable 'unicast' set but not used [-Wunused-but-set-variable]
warning: variable 'write' set but not used [-Wunused-but-set-variable]
warning: variable 'conf' set but not used [-Wunused-but-set-variable]
warning: variable 'a_band' set but not used [-Wunused-but-set-variable]
warning: variable 'tx' set but not used [-Wunused-but-set-variable]
warning: variable 'accum_tx' set but not used [-Wunused-but-set-variable]
warning: variable 'ucode' set but not used [-Wunused-but-set-variable]
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Acked-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 0e139e97
...@@ -476,8 +476,6 @@ il3945_tx_skb(struct il_priv *il, ...@@ -476,8 +476,6 @@ il3945_tx_skb(struct il_priv *il,
int txq_id = skb_get_queue_mapping(skb); int txq_id = skb_get_queue_mapping(skb);
u16 len, idx, hdr_len; u16 len, idx, hdr_len;
u16 firstlen, secondlen; u16 firstlen, secondlen;
u8 id;
u8 unicast;
u8 sta_id; u8 sta_id;
u8 tid = 0; u8 tid = 0;
__le16 fc; __le16 fc;
...@@ -496,9 +494,6 @@ il3945_tx_skb(struct il_priv *il, ...@@ -496,9 +494,6 @@ il3945_tx_skb(struct il_priv *il,
goto drop_unlock; goto drop_unlock;
} }
unicast = !is_multicast_ether_addr(hdr->addr1);
id = 0;
fc = hdr->frame_control; fc = hdr->frame_control;
#ifdef CONFIG_IWLEGACY_DEBUG #ifdef CONFIG_IWLEGACY_DEBUG
...@@ -957,10 +952,8 @@ il3945_rx_queue_restock(struct il_priv *il) ...@@ -957,10 +952,8 @@ il3945_rx_queue_restock(struct il_priv *il)
struct list_head *element; struct list_head *element;
struct il_rx_buf *rxb; struct il_rx_buf *rxb;
unsigned long flags; unsigned long flags;
int write;
spin_lock_irqsave(&rxq->lock, flags); spin_lock_irqsave(&rxq->lock, flags);
write = rxq->write & ~0x7;
while (il_rx_queue_space(rxq) > 0 && rxq->free_count) { while (il_rx_queue_space(rxq) > 0 && rxq->free_count) {
/* Get next free Rx buffer, remove from free list */ /* Get next free Rx buffer, remove from free list */
element = rxq->rx_free.next; element = rxq->rx_free.next;
...@@ -2725,7 +2718,6 @@ void ...@@ -2725,7 +2718,6 @@ void
il3945_post_associate(struct il_priv *il) il3945_post_associate(struct il_priv *il)
{ {
int rc = 0; int rc = 0;
struct ieee80211_conf *conf = NULL;
if (!il->vif || !il->is_open) if (!il->vif || !il->is_open)
return; return;
...@@ -2738,8 +2730,6 @@ il3945_post_associate(struct il_priv *il) ...@@ -2738,8 +2730,6 @@ il3945_post_associate(struct il_priv *il)
il_scan_cancel_timeout(il, 200); il_scan_cancel_timeout(il, 200);
conf = &il->hw->conf;
il->staging.filter_flags &= ~RXON_FILTER_ASSOC_MSK; il->staging.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
il3945_commit_rxon(il); il3945_commit_rxon(il);
......
...@@ -1634,7 +1634,6 @@ il3945_hw_reg_set_txpower(struct il_priv *il, s8 power) ...@@ -1634,7 +1634,6 @@ il3945_hw_reg_set_txpower(struct il_priv *il, s8 power)
{ {
struct il_channel_info *ch_info; struct il_channel_info *ch_info;
s8 max_power; s8 max_power;
u8 a_band;
u8 i; u8 i;
if (il->tx_power_user_lmt == power) { if (il->tx_power_user_lmt == power) {
...@@ -1650,7 +1649,6 @@ il3945_hw_reg_set_txpower(struct il_priv *il, s8 power) ...@@ -1650,7 +1649,6 @@ il3945_hw_reg_set_txpower(struct il_priv *il, s8 power)
for (i = 0; i < il->channel_count; i++) { for (i = 0; i < il->channel_count; i++) {
ch_info = &il->channel_info[i]; ch_info = &il->channel_info[i];
a_band = il_is_channel_a_band(ch_info);
/* find minimum power of all user and regulatory constraints /* find minimum power of all user and regulatory constraints
* (does not consider h/w clipping limitations) */ * (does not consider h/w clipping limitations) */
......
...@@ -1338,15 +1338,12 @@ il4965_accumulative_stats(struct il_priv *il, __le32 * stats) ...@@ -1338,15 +1338,12 @@ il4965_accumulative_stats(struct il_priv *il, __le32 * stats)
u32 *accum_stats; u32 *accum_stats;
u32 *delta, *max_delta; u32 *delta, *max_delta;
struct stats_general_common *general, *accum_general; struct stats_general_common *general, *accum_general;
struct stats_tx *tx, *accum_tx;
prev_stats = (__le32 *) &il->_4965.stats; prev_stats = (__le32 *) &il->_4965.stats;
accum_stats = (u32 *) &il->_4965.accum_stats; accum_stats = (u32 *) &il->_4965.accum_stats;
size = sizeof(struct il_notif_stats); size = sizeof(struct il_notif_stats);
general = &il->_4965.stats.general.common; general = &il->_4965.stats.general.common;
accum_general = &il->_4965.accum_stats.general.common; accum_general = &il->_4965.accum_stats.general.common;
tx = &il->_4965.stats.tx;
accum_tx = &il->_4965.accum_stats.tx;
delta = (u32 *) &il->_4965.delta_stats; delta = (u32 *) &il->_4965.delta_stats;
max_delta = (u32 *) &il->_4965.max_delta; max_delta = (u32 *) &il->_4965.max_delta;
...@@ -4784,7 +4781,6 @@ static void ...@@ -4784,7 +4781,6 @@ static void
il4965_ucode_callback(const struct firmware *ucode_raw, void *context) il4965_ucode_callback(const struct firmware *ucode_raw, void *context)
{ {
struct il_priv *il = context; struct il_priv *il = context;
struct il_ucode_header *ucode;
int err; int err;
struct il4965_firmware_pieces pieces; struct il4965_firmware_pieces pieces;
const unsigned int api_max = il->cfg->ucode_api_max; const unsigned int api_max = il->cfg->ucode_api_max;
...@@ -4814,8 +4810,6 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context) ...@@ -4814,8 +4810,6 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context)
} }
/* Data from ucode file: header followed by uCode images */ /* Data from ucode file: header followed by uCode images */
ucode = (struct il_ucode_header *)ucode_raw->data;
err = il4965_load_firmware(il, ucode_raw, &pieces); err = il4965_load_firmware(il, ucode_raw, &pieces);
if (err) if (err)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment