From 0ba8b68b5b30ad3cba7ed8b6323ff6a127017ff4 Mon Sep 17 00:00:00 2001 From: HyeonggonYoo <42.hyeyoo@gmail.com> Date: Sun, 14 Mar 2021 12:08:58 +0000 Subject: [PATCH] Staging: rtl8723bs: fixed a brace coding style Fixed a coding style issue - unnecessary braces for single statement Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Link: https://lore.kernel.org/r/20210314120858.37951-1-42.hyeyoo@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8723bs/core/rtw_cmd.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c b/drivers/staging/rtl8723bs/core/rtw_cmd.c index bdb77bd..073348d 100644 --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c @@ -676,11 +676,10 @@ u8 rtw_createbss_cmd(struct adapter *padapter) struct wlan_bssid_ex *pdev_network = &padapter->registrypriv.dev_network; u8 res = _SUCCESS; - if (pmlmepriv->assoc_ssid.SsidLength == 0) { + if (pmlmepriv->assoc_ssid.SsidLength == 0) RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for Any SSid:%s\n", pmlmepriv->assoc_ssid.Ssid)); - } else { + else RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for SSid:%s\n", pmlmepriv->assoc_ssid.Ssid)); - } pcmd = rtw_zmalloc(sizeof(struct cmd_obj)); if (pcmd == NULL) { @@ -767,11 +766,10 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork) u32 tmp_len; u8 *ptmp = NULL; - if (pmlmepriv->assoc_ssid.SsidLength == 0) { + if (pmlmepriv->assoc_ssid.SsidLength == 0) RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+Join cmd: Any SSid\n")); - } else { + else RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid =[%s]\n", pmlmepriv->assoc_ssid.Ssid)); - } pcmd = rtw_zmalloc(sizeof(struct cmd_obj)); if (pcmd == NULL) { @@ -810,11 +808,10 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork) psecuritypriv->authenticator_ie[0] = (unsigned char)psecnetwork->IELength; - if ((psecnetwork->IELength-12) < (256-1)) { + if ((psecnetwork->IELength-12) < (256-1)) memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], psecnetwork->IELength-12); - } else { + else memcpy(&psecuritypriv->authenticator_ie[1], &psecnetwork->IEs[12], (256-1)); - } psecnetwork->IELength = 0; /* Added by Albert 2009/02/18 */ @@ -970,17 +967,15 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, struct sta_info *sta, u8 unicast_ memcpy(psetstakey_para->addr, sta->hwaddr, ETH_ALEN); - if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) { + if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) psetstakey_para->algorithm = (unsigned char) psecuritypriv->dot11PrivacyAlgrthm; - } else { + else GET_ENCRY_ALGO(psecuritypriv, sta, psetstakey_para->algorithm, false); - } - if (unicast_key == true) { + if (unicast_key == true) memcpy(&psetstakey_para->key, &sta->dot118021x_UncstKey, 16); - } else { + else memcpy(&psetstakey_para->key, &psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey, 16); - } /* jeff: set this because at least sw key is ready */ padapter->securitypriv.busetkipkey = true; -- 2.7.4