[PATCH 5/9] staging: rtl8723bs: Add necessary braces

From: Javier F. Arias
Date: Tue Nov 12 2019 - 11:54:41 EST


This patchset adds braces when they should be used on all arms of
the statement.
Issue found by Checkpatch.

Signed-off-by: Javier F. Arias <jarias.linux@xxxxxxxxx>
---
drivers/staging/rtl8723bs/core/rtw_xmit.c | 31 +++++++++++++++--------
1 file changed, 20 insertions(+), 11 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_xmit.c b/drivers/staging/rtl8723bs/core/rtw_xmit.c
index fdb585ff5925..42bd5d8362fa 100644
--- a/drivers/staging/rtl8723bs/core/rtw_xmit.c
+++ b/drivers/staging/rtl8723bs/core/rtw_xmit.c
@@ -370,8 +370,9 @@ static void update_attrib_vcs_info(struct adapter *padapter, struct xmit_frame *
/* Other fragments are protected by previous fragment. */
/* So we only need to check the length of first fragment. */
if (pmlmeext->cur_wireless_mode < WIRELESS_11_24N || padapter->registrypriv.wifi_spec) {
- if (sz > padapter->registrypriv.rts_thresh)
+ if (sz > padapter->registrypriv.rts_thresh) {
pattrib->vcs_mode = RTS_CTS;
+ }
else {
if (pattrib->rtsen)
pattrib->vcs_mode = RTS_CTS;
@@ -679,8 +680,9 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib
memcpy(pattrib->ra, pattrib->dst, ETH_ALEN);
memcpy(pattrib->ta, get_bssid(pmlmepriv), ETH_ALEN);
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_ap);
- } else
+ } else {
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_unknown);
+ }

pattrib->pktlen = pktfile.pkt_len;

@@ -724,8 +726,9 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib
rtw_set_scan_deny(padapter, 3000);

/* If EAPOL , ARP , OR DHCP packet, driver must be in active mode. */
- if (pattrib->icmp_pkt == 1)
+ if (pattrib->icmp_pkt == 1) {
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_LEAVE, 1);
+ }
else if (pattrib->dhcp_pkt == 1) {
DBG_COUNTER(padapter->tx_logs.core_tx_upd_attrib_active);
rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_SPECIAL_PACKET, 1);
@@ -926,8 +929,9 @@ static s32 xmitframe_swencrypt(struct adapter *padapter, struct xmit_frame *pxmi
default:
break;
}
- } else
+ } else {
RT_TRACE(_module_rtl871x_xmit_c_, _drv_notice_, ("### xmitframe_hwencrypt\n"));
+ }

return _SUCCESS;
}
@@ -1204,8 +1208,9 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_fram
ClearMFrag(mem_start);

break;
- } else
+ } else {
RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_, ("%s: There're still something in packet!\n", __func__));
+ }

addr = (SIZE_PTR)(pframe);

@@ -1446,8 +1451,9 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len)
case AUTO_VCS:
default:
perp = rtw_get_ie(ie, _ERPINFO_IE_, &erp_len, ie_len);
- if (!perp)
+ if (!perp) {
pxmitpriv->vcs = NONE_VCS;
+ }
else {
protection = (*(perp + 2)) & BIT(1);
if (protection) {
@@ -1455,8 +1461,9 @@ void rtw_update_protection(struct adapter *padapter, u8 *ie, uint ie_len)
pxmitpriv->vcs = RTS_CTS;
else
pxmitpriv->vcs = CTS_TO_SELF;
- } else
+ } else {
pxmitpriv->vcs = NONE_VCS;
+ }
}

break;
@@ -1509,8 +1516,9 @@ static struct xmit_buf *__rtw_alloc_cmd_xmitbuf(struct xmit_priv *pxmitpriv,
DBG_871X("%s pxmitbuf->sctx is not NULL\n", __func__);
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_BUF_ALLOC);
}
- } else
+ } else {
DBG_871X("%s fail, no xmitbuf available !!!\n", __func__);
+ }

return pxmitbuf;
}
@@ -2177,11 +2185,12 @@ inline bool xmitframe_hiq_filter(struct xmit_frame *xmitframe)
, attrib->ether_type, attrib->dhcp_pkt?" DHCP":"");
allow = true;
}
- } else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL)
+ } else if (registry->hiq_filter == RTW_HIQ_FILTER_ALLOW_ALL) {
allow = true;
- else if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) {
- } else
+ } else if (registry->hiq_filter == RTW_HIQ_FILTER_DENY_ALL) {
+ } else {
rtw_warn_on(1);
+ }

return allow;
}
--
2.20.1