Commit 92f87db5 authored by Wambui Karuga's avatar Wambui Karuga Committed by Greg Kroah-Hartman

staging: rtl8723bs: Remove unnecessary braces for single statements

Clean up multiple unnecessary braces around single statement blocks in
drivers/staging/rtl8723bs/core/rtw_mlme.c
Issues reported by checkpatch.pl as:
WARNING: braces {} are not necessary for single statement blocks or
WARNING: braces {} are not necessary for any arm of this statement
Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Link: https://lore.kernel.org/r/c459741e8dc51dc2283fc69f07ed947e2994d0e9.1570712632.git.wambui.karugax@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 409e8332
...@@ -112,10 +112,9 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv) ...@@ -112,10 +112,9 @@ void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv)
{ {
if (pmlmepriv) { if (pmlmepriv) {
rtw_free_mlme_priv_ie_data(pmlmepriv); rtw_free_mlme_priv_ie_data(pmlmepriv);
if (pmlmepriv->free_bss_buf) { if (pmlmepriv->free_bss_buf)
vfree(pmlmepriv->free_bss_buf); vfree(pmlmepriv->free_bss_buf);
} }
}
} }
/* /*
...@@ -753,13 +752,12 @@ int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwor ...@@ -753,13 +752,12 @@ int rtw_is_desired_network(struct adapter *adapter, struct wlan_network *pnetwor
if (psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPA2PSK) { if (psecuritypriv->ndisauthtype == Ndis802_11AuthModeWPA2PSK) {
p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_)); p = rtw_get_ie(pnetwork->network.IEs + _BEACON_IE_OFFSET_, _RSN_IE_2_, &ie_len, (pnetwork->network.IELength - _BEACON_IE_OFFSET_));
if (p && ie_len > 0) { if (p && ie_len > 0)
bselected = true; bselected = true;
} else { else
bselected = false; bselected = false;
} }
} }
}
if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0)) { if ((desired_encmode != Ndis802_11EncryptionDisabled) && (privacy == 0)) {
...@@ -822,9 +820,8 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf) ...@@ -822,9 +820,8 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
/* lock pmlmepriv->lock when you accessing network_q */ /* lock pmlmepriv->lock when you accessing network_q */
if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == false) { if ((check_fwstate(pmlmepriv, _FW_UNDER_LINKING)) == false) {
if (pnetwork->Ssid.Ssid[0] == 0) { if (pnetwork->Ssid.Ssid[0] == 0)
pnetwork->Ssid.SsidLength = 0; pnetwork->Ssid.SsidLength = 0;
}
rtw_add_network(adapter, pnetwork); rtw_add_network(adapter, pnetwork);
} }
...@@ -893,9 +890,8 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf) ...@@ -893,9 +890,8 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE; pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
if (rtw_createbss_cmd(adapter) != _SUCCESS) { if (rtw_createbss_cmd(adapter) != _SUCCESS)
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Error =>rtw_createbss_cmd status FAIL\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("Error =>rtw_createbss_cmd status FAIL\n"));
}
pmlmepriv->to_join = false; pmlmepriv->to_join = false;
} }
...@@ -1166,9 +1162,8 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str ...@@ -1166,9 +1162,8 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
psta = rtw_get_stainfo(pstapriv, pnetwork->network.MacAddress); psta = rtw_get_stainfo(pstapriv, pnetwork->network.MacAddress);
if (!psta) { if (!psta)
psta = rtw_alloc_stainfo(pstapriv, pnetwork->network.MacAddress); psta = rtw_alloc_stainfo(pstapriv, pnetwork->network.MacAddress);
}
if (psta) { /* update ptarget_sta */ if (psta) { /* update ptarget_sta */
...@@ -1347,11 +1342,10 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf) ...@@ -1347,11 +1342,10 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
rtw_get_encrypt_decrypt_from_registrypriv(adapter); rtw_get_encrypt_decrypt_from_registrypriv(adapter);
if (pmlmepriv->assoc_ssid.SsidLength == 0) { if (pmlmepriv->assoc_ssid.SsidLength == 0)
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@ joinbss event call back for Any SSid\n")); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@ joinbss event call back for Any SSid\n"));
} else { else
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@ rtw_joinbss_event_callback for SSid:%s\n", pmlmepriv->assoc_ssid.Ssid)); RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("@@@@@ rtw_joinbss_event_callback for SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
}
the_same_macaddr = !memcmp(pnetwork->network.MacAddress, cur_network->network.MacAddress, ETH_ALEN); the_same_macaddr = !memcmp(pnetwork->network.MacAddress, cur_network->network.MacAddress, ETH_ALEN);
...@@ -1723,13 +1717,8 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf) ...@@ -1723,13 +1717,8 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
_clr_fwstate_(pmlmepriv, WIFI_ADHOC_STATE); _clr_fwstate_(pmlmepriv, WIFI_ADHOC_STATE);
} }
if (rtw_createbss_cmd(adapter) != _SUCCESS) { if (rtw_createbss_cmd(adapter) != _SUCCESS)
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("***Error =>stadel_event_callback: rtw_createbss_cmd status FAIL***\n ")); RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("***Error =>stadel_event_callback: rtw_createbss_cmd status FAIL***\n "));
}
} }
} }
...@@ -1902,10 +1891,9 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter) ...@@ -1902,10 +1891,9 @@ void rtw_dynamic_check_timer_handler(struct adapter *adapter)
} }
} else { } else {
if (is_primary_adapter(adapter)) { if (is_primary_adapter(adapter))
rtw_dynamic_chk_wk_cmd(adapter); rtw_dynamic_chk_wk_cmd(adapter);
} }
}
/* auto site survey */ /* auto site survey */
rtw_auto_scan_handler(adapter); rtw_auto_scan_handler(adapter);
...@@ -2988,9 +2976,8 @@ void rtw_append_exented_cap(struct adapter *padapter, u8 *out_ie, uint *pout_len ...@@ -2988,9 +2976,8 @@ void rtw_append_exented_cap(struct adapter *padapter, u8 *out_ie, uint *pout_len
u8 *pframe; u8 *pframe;
if (phtpriv->bss_coexist) { if (phtpriv->bss_coexist)
SET_EXT_CAPABILITY_ELE_BSS_COEXIST(cap_content, 1); SET_EXT_CAPABILITY_ELE_BSS_COEXIST(cap_content, 1);
}
pframe = rtw_set_ie(out_ie + *pout_len, EID_EXTCapability, 8, cap_content, pout_len); pframe = rtw_set_ie(out_ie + *pout_len, EID_EXTCapability, 8, cap_content, pout_len);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment