iwlwifi: fix compile warnings when compiling without debug
authorReinette Chatre <reinette.chatre@intel.com>
Mon, 5 Apr 2010 17:43:10 +0000 (10:43 -0700)
committerReinette Chatre <reinette.chatre@intel.com>
Fri, 9 Apr 2010 18:32:36 +0000 (11:32 -0700)
Fixes:
CC [M]  drivers/net/wireless/iwlwifi/iwl-agn-rs.o
drivers/net/wireless/iwlwifi/iwl-agn-rs.c: In function ‘rs_get_rate’:
drivers/net/wireless/iwlwifi/iwl-agn-rs.c:2419: warning: unused variable ‘priv’
CC [M]  drivers/net/wireless/iwlwifi/iwl-sta.o
drivers/net/wireless/iwlwifi/iwl-sta.c: In function ‘iwl_send_add_sta’:
drivers/net/wireless/iwlwifi/iwl-sta.c:197: warning: unused variable ‘sta_id’

drivers/net/wireless/iwlwifi/iwl-3945.c: In function ‘iwl3945_rx_reply_rx’:
drivers/net/wireless/iwlwifi/iwl-3945.c:601: warning: unused variable ‘rx_stats_noise_diff’
drivers/net/wireless/iwlwifi/iwl-3945.c:600: warning: unused variable ‘rx_stats_sig_avg’
drivers/net/wireless/iwlwifi/iwl-3945-rs.c: In function ‘rs_get_rate’:
drivers/net/wireless/iwlwifi/iwl-3945-rs.c:650: warning: unused variable ‘priv’

Reported-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
drivers/net/wireless/iwlwifi/iwl-3945-rs.c
drivers/net/wireless/iwlwifi/iwl-3945.c
drivers/net/wireless/iwlwifi/iwl-agn-rs.c
drivers/net/wireless/iwlwifi/iwl-sta.c

index 9e411dc0e5e1f097ccf3e454519a57162e4caced..80e9bbc7884ae56d9d506aa861dcac4a93986872 100644 (file)
@@ -647,7 +647,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta,
        unsigned long flags;
        u16 rate_mask = sta ? sta->supp_rates[sband->band] : 0;
        s8 max_rate_idx = -1;
-       struct iwl_priv *priv = (struct iwl_priv *)priv_r;
+       struct iwl_priv *priv __maybe_unused = (struct iwl_priv *)priv_r;
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 
        IWL_DEBUG_RATE(priv, "enter\n");
index ae5efc376b913e41681acd6114677c00401d3d24..15de649888d828fec874c61d9730a3870f02cdf7 100644 (file)
@@ -597,8 +597,8 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv,
        struct iwl3945_rx_frame_stats *rx_stats = IWL_RX_STATS(pkt);
        struct iwl3945_rx_frame_hdr *rx_hdr = IWL_RX_HDR(pkt);
        struct iwl3945_rx_frame_end *rx_end = IWL_RX_END(pkt);
-       u16 rx_stats_sig_avg = le16_to_cpu(rx_stats->sig_avg);
-       u16 rx_stats_noise_diff = le16_to_cpu(rx_stats->noise_diff);
+       u16 rx_stats_sig_avg __maybe_unused = le16_to_cpu(rx_stats->sig_avg);
+       u16 rx_stats_noise_diff __maybe_unused = le16_to_cpu(rx_stats->noise_diff);
        u8 network_packet;
 
        rx_status.flag = 0;
index 0c3c76803c5e7227237d1a619ef6a2e2f0374df7..3c1cd417bbc520765cd5b7be2f3b4f1070401413 100644 (file)
@@ -2409,7 +2409,7 @@ static void rs_get_rate(void *priv_r, struct ieee80211_sta *sta, void *priv_sta,
 
        struct sk_buff *skb = txrc->skb;
        struct ieee80211_supported_band *sband = txrc->sband;
-       struct iwl_priv *priv = (struct iwl_priv *)priv_r;
+       struct iwl_priv *priv __maybe_unused = (struct iwl_priv *)priv_r;
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
        struct iwl_lq_sta *lq_sta = priv_sta;
        int rate_idx;
index 6876f7c59368ad913ad94831a1c99a3406b4bfd9..9b4d527bd3f8fef0245a5e0d2af0948c39e80f23 100644 (file)
@@ -194,7 +194,7 @@ int iwl_send_add_sta(struct iwl_priv *priv,
                .flags = flags,
                .data = data,
        };
-       u8 sta_id = sta->sta.sta_id;
+       u8 sta_id __maybe_unused = sta->sta.sta_id;
 
        IWL_DEBUG_INFO(priv, "Adding sta %u (%pM) %ssynchronously\n",
                       sta_id, sta->sta.addr, flags & CMD_ASYNC ?  "a" : "");