Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: r8188eu: Fix unused variable warnings

A previous set of patches were test compiled with one of the configuration
variables not set. As a result, a number of unused variables were left in the
code.

In several instances, declaration of the unused variable was the only statement
inside ifdef .. endif pairs. In those cases, the entire block was removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Larry Finger and committed by
Greg Kroah-Hartman
17d41165 259cdb5f

-35
-12
drivers/staging/rtl8188eu/core/rtw_ap.c
··· 43 43 44 44 void free_mlme_ap_info(struct adapter *padapter) 45 45 { 46 - unsigned long irqL; 47 46 struct sta_info *psta = NULL; 48 47 struct sta_priv *pstapriv = &padapter->stapriv; 49 48 struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); ··· 274 275 275 276 void expire_timeout_chk(struct adapter *padapter) 276 277 { 277 - unsigned long irqL; 278 278 struct list_head *phead, *plist; 279 279 u8 updated = 0; 280 280 struct sta_info *psta = NULL; ··· 531 533 532 534 static void update_bmc_sta(struct adapter *padapter) 533 535 { 534 - unsigned long irqL; 535 536 u32 init_rate = 0; 536 537 unsigned char network_type, raid; 537 538 int i, supportRateNum = 0; ··· 617 620 618 621 void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta) 619 622 { 620 - unsigned long irqL; 621 623 struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); 622 624 struct security_priv *psecuritypriv = &padapter->securitypriv; 623 625 struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); ··· 1128 1132 1129 1133 int rtw_acl_add_sta(struct adapter *padapter, u8 *addr) 1130 1134 { 1131 - unsigned long irqL; 1132 1135 struct list_head *plist, *phead; 1133 1136 u8 added = false; 1134 1137 int i, ret = 0; ··· 1193 1198 1194 1199 int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr) 1195 1200 { 1196 - unsigned long irqL; 1197 1201 struct list_head *plist, *phead; 1198 1202 int ret = 0; 1199 1203 struct rtw_wlan_acl_node *paclnode; ··· 1365 1371 1366 1372 void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx) 1367 1373 { 1368 - unsigned long irqL; 1369 1374 struct mlme_priv *pmlmepriv; 1370 1375 struct mlme_ext_priv *pmlmeext; 1371 1376 ··· 1496 1503 { 1497 1504 /* update associcated stations cap. */ 1498 1505 if (updated) { 1499 - unsigned long irqL; 1500 1506 struct list_head *phead, *plist; 1501 1507 struct sta_info *psta = NULL; 1502 1508 struct sta_priv *pstapriv = &padapter->stapriv; ··· 1721 1729 u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, 1722 1730 bool active, u16 reason) 1723 1731 { 1724 - unsigned long irqL; 1725 1732 u8 beacon_updated = false; 1726 1733 struct sta_priv *pstapriv = &padapter->stapriv; 1727 1734 ··· 1761 1770 1762 1771 int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset) 1763 1772 { 1764 - unsigned long irqL; 1765 1773 struct list_head *phead, *plist; 1766 1774 int ret = 0; 1767 1775 struct sta_info *psta = NULL; ··· 1796 1806 1797 1807 int rtw_sta_flush(struct adapter *padapter) 1798 1808 { 1799 - unsigned long irqL; 1800 1809 struct list_head *phead, *plist; 1801 1810 int ret = 0; 1802 1811 struct sta_info *psta = NULL; ··· 1922 1933 1923 1934 void stop_ap_mode(struct adapter *padapter) 1924 1935 { 1925 - unsigned long irqL; 1926 1936 struct list_head *phead, *plist; 1927 1937 struct rtw_wlan_acl_node *paclnode; 1928 1938 struct sta_info *psta = NULL;
-1
drivers/staging/rtl8188eu/core/rtw_debug.c
··· 835 835 off_t offset, int count, 836 836 int *eof, void *data) 837 837 { 838 - unsigned long irqL; 839 838 struct sta_info *psta; 840 839 struct net_device *dev = data; 841 840 struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
-8
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
··· 756 756 unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame) 757 757 { 758 758 #ifdef CONFIG_88EU_AP_MODE 759 - unsigned long irqL; 760 759 unsigned int auth_mode, ie_len; 761 760 u16 seq; 762 761 unsigned char *sa, *p; ··· 1004 1005 unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame) 1005 1006 { 1006 1007 #ifdef CONFIG_88EU_AP_MODE 1007 - unsigned long irqL; 1008 1008 u16 capab_info; 1009 1009 struct rtw_ieee802_11_elems elems; 1010 1010 struct sta_info *pstat; ··· 1588 1590 1589 1591 #ifdef CONFIG_88EU_AP_MODE 1590 1592 if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { 1591 - unsigned long irqL; 1592 1593 struct sta_info *psta; 1593 1594 struct sta_priv *pstapriv = &padapter->stapriv; 1594 1595 ··· 1651 1654 1652 1655 #ifdef CONFIG_88EU_AP_MODE 1653 1656 if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { 1654 - unsigned long irqL; 1655 1657 struct sta_info *psta; 1656 1658 struct sta_priv *pstapriv = &padapter->stapriv; 1657 1659 ··· 4479 4483 __le16 *fctrl; 4480 4484 unsigned int rate_len; 4481 4485 struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); 4482 - #if defined(CONFIG_88EU_AP_MODE) 4483 - unsigned long irqL; 4484 - #endif /* if defined (CONFIG_88EU_AP_MODE) */ 4485 4486 struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); 4486 4487 struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); 4487 4488 struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); ··· 8353 8360 } 8354 8361 #ifdef CONFIG_88EU_AP_MODE 8355 8362 else { /* tx bc/mc frames after update TIM */ 8356 - unsigned long irqL; 8357 8363 struct sta_info *psta_bmc; 8358 8364 struct list_head *xmitframe_plist, *xmitframe_phead; 8359 8365 struct xmit_frame *pxmitframe = NULL;
-1
drivers/staging/rtl8188eu/core/rtw_recv.c
··· 1092 1092 } 1093 1093 1094 1094 if ((psta->state&WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap&BIT(psta->aid))) { 1095 - unsigned long irqL; 1096 1095 struct list_head *xmitframe_plist, *xmitframe_phead; 1097 1096 struct xmit_frame *pxmitframe = NULL; 1098 1097
-4
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
··· 173 173 174 174 static void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv) 175 175 { 176 - #ifdef CONFIG_88EU_AP_MODE 177 - struct wlan_acl_pool *pacl_list = &pstapriv->acl_list; 178 - #endif 179 176 rtw_mfree_all_stainfo(pstapriv); /* be done before free sta_hash_lock */ 180 177 } 181 178 ··· 552 555 { 553 556 u8 res = true; 554 557 #ifdef CONFIG_88EU_AP_MODE 555 - unsigned long irql; 556 558 struct list_head *plist, *phead; 557 559 struct rtw_wlan_acl_node *paclnode; 558 560 u8 match = false;
-8
drivers/staging/rtl8188eu/core/rtw_xmit.c
··· 1651 1651 */ 1652 1652 s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe) 1653 1653 { 1654 - /* unsigned long irql0; */ 1655 1654 u8 ac_index; 1656 1655 struct sta_info *psta; 1657 1656 struct tx_servq *ptxservq; ··· 1911 1912 */ 1912 1913 s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt) 1913 1914 { 1914 - #ifdef CONFIG_88EU_AP_MODE 1915 - unsigned long irql0; 1916 - #endif 1917 1915 struct xmit_priv *pxmitpriv = &padapter->xmitpriv; 1918 1916 struct xmit_frame *pxmitframe = NULL; 1919 1917 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; ··· 1968 1972 1969 1973 int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frame *pxmitframe) 1970 1974 { 1971 - unsigned long irql; 1972 1975 int ret = false; 1973 1976 struct sta_info *psta = NULL; 1974 1977 struct sta_priv *pstapriv = &padapter->stapriv; ··· 2098 2103 2099 2104 void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta) 2100 2105 { 2101 - unsigned long irql0; 2102 2106 struct sta_info *psta_bmc; 2103 2107 struct sta_xmit_priv *pstaxmitpriv; 2104 2108 struct sta_priv *pstapriv = &padapter->stapriv; ··· 2136 2142 2137 2143 void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta) 2138 2144 { 2139 - unsigned long irql; 2140 2145 u8 update_mask = 0, wmmps_ac = 0; 2141 2146 struct sta_info *psta_bmc; 2142 2147 struct list_head *xmitframe_plist, *xmitframe_phead; ··· 2265 2272 2266 2273 void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *psta) 2267 2274 { 2268 - unsigned long irql; 2269 2275 u8 wmmps_ac = 0; 2270 2276 struct list_head *xmitframe_plist, *xmitframe_phead; 2271 2277 struct xmit_frame *pxmitframe = NULL;
-1
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
··· 5237 5237 5238 5238 static int rtw_del_sta(struct net_device *dev, struct ieee_param *param) 5239 5239 { 5240 - unsigned long irqL; 5241 5240 int ret = 0; 5242 5241 struct sta_info *psta = NULL; 5243 5242 struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);