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

staging: rtl8723bs: core: rtw_mlme: Remove a bunch of unused variables

Fixes the following W=1 kernel build warning(s):

drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_build_wmm_ie_ht’:
drivers/staging/rtl8723bs/core/rtw_mlme.c:2482:6: warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_restructure_ht_ie’:
drivers/staging/rtl8723bs/core/rtw_mlme.c:2498:21: warning: variable ‘pframe’ set but not used [-Wunused-but-set-variable]
drivers/staging/rtl8723bs/core/rtw_mlme.c: In function ‘rtw_update_ht_cap’:
drivers/staging/rtl8723bs/core/rtw_mlme.c:2647:33: warning: variable ‘pht_addtinfo’ set but not used [-Wunused-but-set-variable]
from drivers/staging/rtl8188eu/core/rtw_mlme.c:12:

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-staging@lists.linux.dev
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20210414181129.1628598-11-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Lee Jones and committed by
Greg Kroah-Hartman
4c98e73f 683707c7

+6 -9
+6 -9
drivers/staging/rtl8723bs/core/rtw_mlme.c
··· 2353 2353 { 2354 2354 unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00}; 2355 2355 int out_len; 2356 - u8 *pframe; 2357 2356 2358 2357 if (padapter->mlmepriv.qospriv.qos_option == 0) { 2359 2358 out_len = *pout_len; 2360 - pframe = rtw_set_ie(out_ie+out_len, WLAN_EID_VENDOR_SPECIFIC, 2361 - _WMM_IE_Length_, WMM_IE, pout_len); 2359 + rtw_set_ie(out_ie+out_len, WLAN_EID_VENDOR_SPECIFIC, 2360 + _WMM_IE_Length_, WMM_IE, pout_len); 2362 2361 2363 2362 padapter->mlmepriv.qospriv.qos_option = 1; 2364 2363 } ··· 2368 2369 { 2369 2370 u32 ielen, out_len; 2370 2371 enum ieee80211_max_ampdu_length_exp max_rx_ampdu_factor; 2371 - unsigned char *p, *pframe; 2372 + unsigned char *p; 2372 2373 struct ieee80211_ht_cap ht_capie; 2373 2374 u8 cbw40_enable = 0, stbc_rx_enable = 0, rf_type = 0, operation_bw = 0; 2374 2375 struct registry_priv *pregistrypriv = &padapter->registrypriv; ··· 2491 2492 else 2492 2493 ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00); 2493 2494 2494 - pframe = rtw_set_ie(out_ie+out_len, WLAN_EID_HT_CAPABILITY, 2495 - sizeof(struct ieee80211_ht_cap), (unsigned char *)&ht_capie, pout_len); 2495 + rtw_set_ie(out_ie+out_len, WLAN_EID_HT_CAPABILITY, 2496 + sizeof(struct ieee80211_ht_cap), (unsigned char *)&ht_capie, pout_len); 2496 2497 2497 2498 phtpriv->ht_option = true; 2498 2499 ··· 2500 2501 p = rtw_get_ie(in_ie, WLAN_EID_HT_OPERATION, &ielen, in_len); 2501 2502 if (p && (ielen == sizeof(struct ieee80211_ht_addt_info))) { 2502 2503 out_len = *pout_len; 2503 - pframe = rtw_set_ie(out_ie+out_len, WLAN_EID_HT_OPERATION, ielen, p+2, pout_len); 2504 + rtw_set_ie(out_ie+out_len, WLAN_EID_HT_OPERATION, ielen, p+2, pout_len); 2504 2505 } 2505 2506 } 2506 2507 ··· 2515 2516 int len; 2516 2517 /* struct sta_info *bmc_sta, *psta; */ 2517 2518 struct ieee80211_ht_cap *pht_capie; 2518 - struct ieee80211_ht_addt_info *pht_addtinfo; 2519 2519 /* struct recv_reorder_ctrl *preorder_ctrl; */ 2520 2520 struct mlme_priv *pmlmepriv = &padapter->mlmepriv; 2521 2521 struct ht_priv *phtpriv = &pmlmepriv->htpriv; ··· 2551 2553 len = 0; 2552 2554 p = rtw_get_ie(pie+sizeof(struct ndis_802_11_fix_ie), WLAN_EID_HT_OPERATION, &len, ie_len-sizeof(struct ndis_802_11_fix_ie)); 2553 2555 if (p && len > 0) { 2554 - pht_addtinfo = (struct ieee80211_ht_addt_info *)(p+2); 2555 2556 /* todo: */ 2556 2557 } 2557 2558