rtlwifi: Fix warnings from gcc 4.6.0
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 23 May 2011 01:54:31 +0000 (20:54 -0500)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 1 Jun 2011 19:12:29 +0000 (15:12 -0400)
gcc 4.6.0 warnings for rtlwifi:

  CC [M]  drivers/net/wireless/rtlwifi/base.o
drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_stop’:
drivers/net/wireless/rtlwifi/base.c:891:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/base.c: In function ‘rtl_tx_agg_oper’:
drivers/net/wireless/rtlwifi/base.c:921:23: warning: variable ‘tid_data’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/efuse.o
drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_pg_packet_write’:
drivers/net/wireless/rtlwifi/efuse.c:928:24: warning: variable ‘dataempty’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/efuse.c: In function ‘efuse_get_current_size’:
drivers/net/wireless/rtlwifi/efuse.c:1179:5: warning: variable ‘hoffset’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/ps.o
drivers/net/wireless/rtlwifi/ps.c: In function ‘rtl_ps_set_rf_state’:
drivers/net/wireless/rtlwifi/ps.c:85:19: warning: variable ‘rtstate’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/regd.o
drivers/net/wireless/rtlwifi/regd.c: In function ‘_rtl_dump_channel_map’:
drivers/net/wireless/rtlwifi/regd.c:310:28: warning: variable ‘ch’ set but not used [-Wunused-but-set-variable]
  CC [M]  drivers/net/wireless/rtlwifi/usb.o
drivers/net/wireless/rtlwifi/usb.c: In function ‘_rtl_usb_transmit’:
drivers/net/wireless/rtlwifi/usb.c:826:21: warning: variable ‘urb_list’ set but not used [-Wunused-but-set-variable]
drivers/net/wireless/rtlwifi/usb.c:825:23: warning: variable ‘skb_list’ set but not used [-Wunused-but-set-variable]

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/rtlwifi/base.c
drivers/net/wireless/rtlwifi/efuse.c
drivers/net/wireless/rtlwifi/ps.c
drivers/net/wireless/rtlwifi/regd.c

index ccb6da3..fb5e43b 100644 (file)
@@ -888,7 +888,6 @@ int rtl_tx_agg_stop(struct ieee80211_hw *hw,
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
-       struct rtl_tid_data *tid_data;
        struct rtl_sta_info *sta_entry = NULL;
 
        if (sta == NULL)
@@ -906,7 +905,6 @@ int rtl_tx_agg_stop(struct ieee80211_hw *hw,
                return -EINVAL;
 
        sta_entry = (struct rtl_sta_info *)sta->drv_priv;
-       tid_data = &sta_entry->tids[tid];
        sta_entry->tids[tid].agg.agg_state = RTL_AGG_STOP;
 
        ieee80211_stop_tx_ba_cb_irqsafe(mac->vif, sta->addr, tid);
@@ -918,7 +916,6 @@ int rtl_tx_agg_oper(struct ieee80211_hw *hw,
                struct ieee80211_sta *sta, u16 tid)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
-       struct rtl_tid_data *tid_data;
        struct rtl_sta_info *sta_entry = NULL;
 
        if (sta == NULL)
@@ -936,7 +933,6 @@ int rtl_tx_agg_oper(struct ieee80211_hw *hw,
                return -EINVAL;
 
        sta_entry = (struct rtl_sta_info *)sta->drv_priv;
-       tid_data = &sta_entry->tids[tid];
        sta_entry->tids[tid].agg.agg_state = RTL_AGG_OPERATIONAL;
 
        return 0;
index 50de6f5..0b56232 100644 (file)
@@ -925,7 +925,7 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct pgpkt_struct target_pkt;
        u8 write_state = PG_STATE_HEADER;
-       int continual = true, dataempty = true, result = true;
+       int continual = true, result = true;
        u16 efuse_addr = 0;
        u8 efuse_data;
        u8 target_word_cnts = 0;
@@ -953,7 +953,6 @@ static int efuse_pg_packet_write(struct ieee80211_hw *hw,
               (EFUSE_MAX_SIZE - EFUSE_OOB_PROTECT_BYTES))) {
 
                if (write_state == PG_STATE_HEADER) {
-                       dataempty = true;
                        badworden = 0x0F;
                        RTPRINT(rtlpriv, FEEPROM, EFUSE_PG,
                                ("efuse PG_STATE_HEADER\n"));
@@ -1176,13 +1175,12 @@ static u16 efuse_get_current_size(struct ieee80211_hw *hw)
 {
        int continual = true;
        u16 efuse_addr = 0;
-       u8 hoffset, hworden;
+       u8 hworden;
        u8 efuse_data, word_cnts;
 
        while (continual && efuse_one_byte_read(hw, efuse_addr, &efuse_data)
               && (efuse_addr < EFUSE_MAX_SIZE)) {
                if (efuse_data != 0xFF) {
-                       hoffset = (efuse_data >> 4) & 0x0F;
                        hworden = efuse_data & 0x0F;
                        word_cnts = efuse_calculate_word_cnts(hworden);
                        efuse_addr = efuse_addr + (word_cnts * 2) + 1;
index 39b0297..a73ffbe 100644 (file)
@@ -82,7 +82,6 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
-       enum rf_pwrstate rtstate;
        bool actionallowed = false;
        u16 rfwait_cnt = 0;
        unsigned long flag;
@@ -129,8 +128,6 @@ bool rtl_ps_set_rf_state(struct ieee80211_hw *hw,
        }
 
 no_protect:
-       rtstate = ppsc->rfpwr_state;
-
        switch (state_toset) {
        case ERFON:
                ppsc->rfoff_reason &= (~changesource);
index 8f6718f..9fedb1f 100644 (file)
@@ -303,22 +303,6 @@ static void _rtl_reg_apply_world_flags(struct wiphy *wiphy,
        return;
 }
 
-static void _rtl_dump_channel_map(struct wiphy *wiphy)
-{
-       enum ieee80211_band band;
-       struct ieee80211_supported_band *sband;
-       struct ieee80211_channel *ch;
-       unsigned int i;
-
-       for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
-               if (!wiphy->bands[band])
-                       continue;
-               sband = wiphy->bands[band];
-               for (i = 0; i < sband->n_channels; i++)
-                       ch = &sband->channels[i];
-       }
-}
-
 static int _rtl_reg_notifier_apply(struct wiphy *wiphy,
                                   struct regulatory_request *request,
                                   struct rtl_regulatory *reg)
@@ -336,8 +320,6 @@ static int _rtl_reg_notifier_apply(struct wiphy *wiphy,
                break;
        }
 
-       _rtl_dump_channel_map(wiphy);
-
        return 0;
 }