Staging: rtl8723bs/core fix brace coding style issues in rtw_ioctl_set.c
authorBrother Matthew De Angelis <matthew.v.deangelis@gmail.com>
Thu, 3 Dec 2020 02:58:36 +0000 (20:58 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Dec 2020 15:45:55 +0000 (16:45 +0100)
Fix all the brace code style warnings found by the checkpatch tool at the following lines:
rtw_ioctl_set.c:178: WARNING: braces {} are not necessary for any arm of this statement
rtw_ioctl_set.c:219: WARNING: braces {} are not necessary for any arm of this statement
rtw_ioctl_set.c:255: WARNING: braces {} are not necessary for any arm of this statement
rtw_ioctl_set.c:324: WARNING: braces {} are not necessary for any arm of this statement
rtw_ioctl_set.c:372: WARNING: braces {} are not necessary for any arm of this statement
rtw_ioctl_set.c:396: WARNING: braces {} are not necessary for any arm of this statement
rtw_ioctl_set.c:441: WARNING: braces {} are not necessary for single statement blocks
rtw_ioctl_set.c:527: WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Brother Matthew De Angelis <matthew.v.deangelis@gmail.com>
Link: https://lore.kernel.org/r/20201203025836.GA420974@a
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_ioctl_set.c

index 3adeca6..1cfdf7c 100644 (file)
@@ -175,11 +175,10 @@ u8 rtw_set_802_11_bssid(struct adapter *padapter, u8 *bssid)
 
 
        DBG_871X("Set BSSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
-       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
+       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
                goto handle_tkip_countermeasure;
-       } else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) {
+       else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
                goto release_mlme_lock;
-       }
 
        if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) {
                RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_, ("set_bssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n"));
@@ -216,11 +215,10 @@ handle_tkip_countermeasure:
        memcpy(&pmlmepriv->assoc_bssid, bssid, ETH_ALEN);
        pmlmepriv->assoc_by_bssid = true;
 
-       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
+       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
                pmlmepriv->to_join = true;
-       } else {
+       else
                status = rtw_do_join(padapter);
-       }
 
 release_mlme_lock:
        spin_unlock_bh(&pmlmepriv->lock);
@@ -252,11 +250,10 @@ u8 rtw_set_802_11_ssid(struct adapter *padapter, struct ndis_802_11_ssid *ssid)
        spin_lock_bh(&pmlmepriv->lock);
 
        DBG_871X("Set SSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
-       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
+       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
                goto handle_tkip_countermeasure;
-       } else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) {
+       else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
                goto release_mlme_lock;
-       }
 
        if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE) == true) {
                RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
@@ -321,11 +318,10 @@ handle_tkip_countermeasure:
        memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(struct ndis_802_11_ssid));
        pmlmepriv->assoc_by_bssid = false;
 
-       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
+       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
                pmlmepriv->to_join = true;
-       } else {
+       else
                status = rtw_do_join(padapter);
-       }
 
 release_mlme_lock:
        spin_unlock_bh(&pmlmepriv->lock);
@@ -369,11 +365,10 @@ u8 rtw_set_802_11_connect(struct adapter *padapter, u8 *bssid, struct ndis_802_1
        DBG_871X_LEVEL(_drv_always_, FUNC_ADPT_FMT"  fw_state = 0x%08x\n",
                FUNC_ADPT_ARG(padapter), get_fwstate(pmlmepriv));
 
-       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
+       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
                goto handle_tkip_countermeasure;
-       } else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true) {
+       else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING) == true)
                goto release_mlme_lock;
-       }
 
 handle_tkip_countermeasure:
        if (rtw_handle_tkip_countermeasure(padapter, __func__) == _FAIL) {
@@ -393,11 +388,10 @@ handle_tkip_countermeasure:
                pmlmepriv->assoc_by_bssid = false;
        }
 
-       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true) {
+       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == true)
                pmlmepriv->to_join = true;
-       } else {
+       else
                status = rtw_do_join(padapter);
-       }
 
 release_mlme_lock:
        spin_unlock_bh(&pmlmepriv->lock);
@@ -438,9 +432,8 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter *padapter,
                        rtw_free_assoc_resources(padapter, 1);
 
                if ((*pold_state == Ndis802_11Infrastructure) || (*pold_state == Ndis802_11IBSS)) {
-                       if (check_fwstate(pmlmepriv, _FW_LINKED) == true) {
+                       if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
                                rtw_indicate_disconnect(padapter); /* will clr Linked_state; before this function, we must have checked whether issue dis-assoc_cmd or not */
-                       }
               }
 
                *pold_state = networktype;
@@ -524,11 +517,10 @@ u8 rtw_set_802_11_bssid_list_scan(struct adapter *padapter, struct ndis_802_11_s
                RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("rtw_set_802_11_bssid_list_scan fail since fw_state = %x\n", get_fwstate(pmlmepriv)));
                res = true;
 
-               if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING)) == true) {
+               if (check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY|_FW_UNDER_LINKING)) == true)
                        RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n\n"));
-               } else {
+               else
                        RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("\n###pmlmepriv->sitesurveyctrl.traffic_busy ==true\n\n"));
-               }
        } else {
                if (rtw_is_scan_deny(padapter)) {
                        DBG_871X(FUNC_ADPT_FMT": scan deny\n", FUNC_ADPT_ARG(padapter));