Skip to contentSkip to conversation

staging: rtl8723bs: fix unbalanced braces in 3 files

PATCH New Jennifer Guo 1 participant 1 message May 12 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: rtl8723bs: fix unbalanced braces in 3 files

Add missing braces to if/else statements to comply with kernel coding style.

This fixes the following checkpatch.pl checks:
- CHECK: Unbalanced braces around else statement
- CHECK: braces {} should be used on all arms of this statement

---
 drivers/staging/rtl8723bs/core/rtw_efuse.c |  4 ++--
 drivers/staging/rtl8723bs/core/rtw_mlme.c  | 17 ++++++++++-------
 drivers/staging/rtl8723bs/core/rtw_xmit.c  |  3 ++-
 3 files changed, 14 insertions(+), 10 deletions(-)
drivers/staging/rtl8723bs/core/rtw_efuse.c +2 -2
index 803a608b74fa..a40d6eab7249 100644
@@ -76,9 +76,9 @@ u16		Address)
 				break;
 		}
 		return rtw_read8(Adapter, EFUSE_CTRL);
-	} else
+	} else {
 		return 0xFF;
-
+	}
 } /* rtw_efuse_read_1_byte */
 
 /*  11/16/2008 MH Read one byte from real Efuse. */
drivers/staging/rtl8723bs/core/rtw_mlme.c +10 -7
index 963b53027c68..6be53e6df1f5 100644
@@ -742,9 +742,9 @@ void rtw_surveydone_event_callback(struct adapter	*adapter, u8 *pbuf)
 					} else {
 						pmlmepriv->to_join = true;
 					}
-				} else
+				} else {
 					rtw_indicate_disconnect(adapter);
-
+				}
 				_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
 			}
 		}
@@ -1554,15 +1554,17 @@ void rtw_mlme_reset_auto_scan_int(struct adapter *adapter)
 	struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
 	struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
 
-	if (pmlmeinfo->VHT_enable) /* disable auto scan when connect to 11AC AP */
+	if (pmlmeinfo->VHT_enable) {
+		/* disable auto scan when connect to 11AC AP */
 		mlme->auto_scan_int_ms = 0;
-	else if (adapter->registrypriv.wifi_spec && is_client_associated_to_ap(adapter))
+	} else if (adapter->registrypriv.wifi_spec && is_client_associated_to_ap(adapter)) {
 		mlme->auto_scan_int_ms = 60 * 1000;
-	else if (rtw_chk_roam_flags(adapter, RTW_ROAM_ACTIVE)) {
+	} else if (rtw_chk_roam_flags(adapter, RTW_ROAM_ACTIVE)) {
 		if (check_fwstate(mlme, WIFI_STATION_STATE) && check_fwstate(mlme, _FW_LINKED))
 			mlme->auto_scan_int_ms = mlme->roam_scan_int_ms;
-	} else
+	} else {
 		mlme->auto_scan_int_ms = 0; /* disabled */
+	}
 }
 
 static void rtw_auto_scan_handler(struct adapter *padapter)
@@ -2282,9 +2284,10 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
 			operation_bw = padapter->mlmeextpriv.cur_bwmode;
 			if (operation_bw > CHANNEL_WIDTH_40)
 				operation_bw = CHANNEL_WIDTH_40;
-		} else
+		} else {
 			/* TDLS: TODO 40? */
 			operation_bw = CHANNEL_WIDTH_40;
+		}
 	} else {
 		p = rtw_get_ie(in_ie, WLAN_EID_HT_OPERATION, &ielen, in_len);
 		if (p && (ielen == sizeof(struct ieee80211_ht_addt_info))) {
drivers/staging/rtl8723bs/core/rtw_xmit.c +2 -1
index 458e471535ad..a28830b4f4e7 100644
@@ -2037,8 +2037,9 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
 	} else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL)
 		allow = true;
 	else if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) {
-	} else
+	} else {
 		WARN_ON(1);
+	}
 
 	return allow;
 }
Signature · 1 line
2.34.1