staging: rtl8723au: Fixed multiple space issues
PATCH 1/1 staging: rtl8723au: Fixed multiple space issues
Fixed multiple space issues found by checkpatch.pl in drivers/staging/rtl8723au/core/rtw_ap.c
--- drivers/staging/rtl8723au/core/rtw_ap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8723au/core/rtw_ap.c +7 -7
@@ -897,7 +897,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, pairwise_cipher =0 ; psecuritypriv->wpa_group_cipher =0 ; psecuritypriv->wpa_pairwise_cipher =0 ; -for (p = ie; ;p += (ie_len +2 )) { +for (p = ie; ; p += (ie_len +2 )) { p =rtw_get_ie23a (p,WLAN_EID_VENDOR_SPECIFIC , &ie_len, pbss_network->IELength - (ie_len +2 ));if ((p) && (!memcmp (p+2 ,RTW_WPA_OUI23A_TYPE ,4 ))) {
@@ -924,7 +924,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, ie_len =0 ; pmlmepriv->qos_option =0 ;if (pregistrypriv->wmm_enable) { -for (p = ie; ;p += (ie_len +2 )) { +for (p = ie; ; p += (ie_len +2 )) { p =rtw_get_ie23a (p,WLAN_EID_VENDOR_SPECIFIC , &ie_len, (pbss_network->IELength - (ie_len +2 )));
@@ -1204,7 +1204,7 @@ static void update_bcn_p2p_ie(struct rtw_adapter *padapter) { } -static void update_bcn_vendor_spec_ie (struct rtw_adapter *padapter,u8 *oui) +static void update_bcn_vendor_spec_ie (struct rtw_adapter *padapter,u8 *oui) {DBG_8723A ("%s\n" , __func__);
@@ -1642,7 +1642,7 @@ u8 ap_free_sta23a(struct rtw_adapter *padapter, struct sta_info *psta, bool actireturn beacon_updated; } -int rtw_ap_inform_ch_switch23a (struct rtw_adapter *padapter,u8 new_ch,u8 ch_offset) +int rtw_ap_inform_ch_switch23a (struct rtw_adapter *padapter,u8 new_ch,u8 ch_offset) {struct list_head *phead, *plist;struct sta_info *psta =NULL ;
@@ -1663,12 +1663,12 @@ int rtw_ap_inform_ch_switch23a (struct rtw_adapter *padapter, u8 new_ch, u8 ch_olist_for_each (plist, phead) { psta = container_of(plist, struct sta_info, asoc_list); -issue_action_spct_ch_switch23a (padapter, psta->hwaddr, new_ch, ch_offset); +issue_action_spct_ch_switch23a (padapter, psta->hwaddr, new_ch, ch_offset); psta->expire_to = ((pstapriv->expire_to *2 ) >5 ) ?5 : (pstapriv->expire_to *2 ); }spin_unlock_bh (&pstapriv->asoc_list_lock); -issue_action_spct_ch_switch23a (padapter, bc_addr, new_ch, ch_offset); +issue_action_spct_ch_switch23a (padapter, bc_addr, new_ch, ch_offset);return 0 ; }
@@ -1871,7 +1871,7 @@ void stop_ap_mode23a(struct rtw_adapter *padapter) pmlmeext->bstart_bss = false;/* reset and init security priv , this can refine with rtw_reset_securitypriv23a */ -memset ((unsigned char *)&padapter->securitypriv,0 ,sizeof (struct security_priv )); +memset ((unsigned char *)&padapter->securitypriv,0 ,sizeof (struct security_priv )); padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen; padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;
Signature · 1 line
2.0.5
Quoted 2 lines · Matthew Emerson
Fixed multiple space issues found by checkpatch.pl in
drivers/staging/rtl8723au/core/rtw_ap.c
Hello.
Please strive for more than simple robotic like adherence to checkpatch messages.
A lot of the time, there is a better way.
drivers/staging/rtl8723au/core/rtw_ap.c
Quoted 1 line
drivers/staging/rtl8723au/core/rtw_ap.c +0
-0
[]
drivers/staging/rtl8723au/core/rtw_ap.c int rtw_check_beacon_data23a(struct rtw_adapter *padapter, · line 900
Quoted 6 lines
drivers/staging/rtl8723au/core/rtw_ap.c +1
-1@@ -897,7 +897,7 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, pairwise_cipher =0 ; psecuritypriv->wpa_group_cipher =0 ; psecuritypriv->wpa_pairwise_cipher =0 ; -for (p = ie; ;p += (ie_len +2 )) { +for (p = ie; ; p += (ie_len +2 )) {
While it's arguably true that the ; is misplaced, the loop control logic is probably better rewritten for clarity here instead.
[]
drivers/staging/rtl8723au/core/rtw_ap.c void stop_ap_mode23a(struct rtw_adapter *padapter) · line 1874
Quoted 6 lines
drivers/staging/rtl8723au/core/rtw_ap.c +1
-1@@ -1871,7 +1871,7 @@ void stop_ap_mode23a(struct rtw_adapter *padapter) pmlmeext->bstart_bss = false;/* reset and init security priv , this can refine with rtw_reset_securitypriv23a */ -memset ((unsigned char *)&padapter->securitypriv,0 ,sizeof (struct security_priv )); +memset ((unsigned char *)&padapter->securitypriv,0 ,sizeof (struct security_priv ));
unnecessary cast too.
More likely this style would be nicer:
memset(&adapter->securitypriv, 0, sizeof(adapter->securitypriv));
You could also use a compound literal.