Re: [PATCH 12/19] staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites

2021-04-14 Thread Joe Perches
On Tue, 2021-04-13 at 17:52 +0300, Dan Carpenter wrote:
> On Wed, Apr 07, 2021 at 03:49:36PM +0200, Fabio Aiuto wrote:
> > @@ -2586,11 +2583,9 @@ static int rtw_dbg_port(struct net_device *dev,
> >  
> > 
> >     plist = 
> > get_next(plist);
> >  
> > 
> > -   if (extra_arg 
> > == psta->aid) {
> > -   for (j 
> > = 0; j < 16; j++) {
> > +   if (extra_arg 
> > == psta->aid)
> > +   for (j 
> > = 0; j < 16; j++)
> >     
> > preorder_ctrl = >recvreorder_ctrl[j];
> > -   }
> > -   }
> 
> I think Greg already applied this so no stress (don't bother fixing),
> but you removed a bit too much on this one.  Multi-line indents normally
> get curly braces for readability.  In other words:
> 
>   if (extra_arg == psta->aid) {
>   for (j = 0; j < 16; j++)
>   preorder_ctrl = 
> >recvreorder_ctrl[j];
>   }
> 
> regards,
> dan carpenter
> 




Re: [PATCH 12/19] staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites

2021-04-13 Thread Dan Carpenter
On Wed, Apr 07, 2021 at 03:49:36PM +0200, Fabio Aiuto wrote:
> @@ -2586,11 +2583,9 @@ static int rtw_dbg_port(struct net_device *dev,
>  
>   plist = 
> get_next(plist);
>  
> - if (extra_arg 
> == psta->aid) {
> - for (j 
> = 0; j < 16; j++) {
> + if (extra_arg 
> == psta->aid)
> + for (j 
> = 0; j < 16; j++)
>   
> preorder_ctrl = >recvreorder_ctrl[j];
> - }
> - }

I think Greg already applied this so no stress (don't bother fixing),
but you removed a bit too much on this one.  Multi-line indents normally
get curly braces for readability.  In other words:

if (extra_arg == psta->aid) {
for (j = 0; j < 16; j++)
preorder_ctrl = 
>recvreorder_ctrl[j];
}

regards,
dan carpenter



[PATCH 12/19] staging: rtl8723bs: remove unnecessary bracks on DBG_871X removal sites

2021-04-07 Thread Fabio Aiuto
remove unnecessary bracks on DBG_871X removal sites

Signed-off-by: Fabio Aiuto 
---
 drivers/staging/rtl8723bs/core/rtw_ap.c   |  9 +-
 drivers/staging/rtl8723bs/core/rtw_btcoex.c   |  6 +-
 drivers/staging/rtl8723bs/core/rtw_cmd.c  | 10 +--
 .../staging/rtl8723bs/core/rtw_ieee80211.c| 10 +--
 drivers/staging/rtl8723bs/core/rtw_io.c   |  3 +-
 drivers/staging/rtl8723bs/core/rtw_mlme.c | 32 +++
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 77 ++---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c  | 54 +---
 drivers/staging/rtl8723bs/core/rtw_recv.c | 28 +++---
 drivers/staging/rtl8723bs/core/rtw_security.c | 15 ++--
 .../staging/rtl8723bs/core/rtw_wlan_util.c| 85 ---
 drivers/staging/rtl8723bs/core/rtw_xmit.c | 61 +
 drivers/staging/rtl8723bs/hal/HalPwrSeqCmd.c  |  4 +-
 drivers/staging/rtl8723bs/hal/hal_com.c   |  6 +-
 .../staging/rtl8723bs/hal/hal_com_phycfg.c| 69 ++-
 drivers/staging/rtl8723bs/hal/rtl8723b_cmd.c  | 12 +--
 .../staging/rtl8723bs/hal/rtl8723b_hal_init.c |  8 +-
 .../staging/rtl8723bs/hal/rtl8723b_phycfg.c   |  3 +-
 .../staging/rtl8723bs/hal/rtl8723bs_xmit.c|  9 +-
 drivers/staging/rtl8723bs/hal/sdio_halinit.c  |  4 +-
 drivers/staging/rtl8723bs/hal/sdio_ops.c  |  6 +-
 .../staging/rtl8723bs/os_dep/ioctl_cfg80211.c | 18 ++--
 .../staging/rtl8723bs/os_dep/ioctl_linux.c| 57 +
 drivers/staging/rtl8723bs/os_dep/mlme_linux.c |  4 +-
 drivers/staging/rtl8723bs/os_dep/os_intfs.c   | 22 ++---
 drivers/staging/rtl8723bs/os_dep/recv_linux.c |  3 +-
 drivers/staging/rtl8723bs/os_dep/sdio_intf.c  |  9 +-
 .../staging/rtl8723bs/os_dep/sdio_ops_linux.c | 52 
 drivers/staging/rtl8723bs/os_dep/xmit_linux.c |  9 +-
 29 files changed, 254 insertions(+), 431 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_ap.c 
b/drivers/staging/rtl8723bs/core/rtw_ap.c
index 015c1d74a92d..10589d52bba9 100644
--- a/drivers/staging/rtl8723bs/core/rtw_ap.c
+++ b/drivers/staging/rtl8723bs/core/rtw_ap.c
@@ -274,9 +274,8 @@ void expire_timeout_chk(struct adapter *padapter)
&& padapter->xmitpriv.free_xmitframe_cnt < ((
NR_XMITFRAME / pstapriv->asoc_list_cnt
) / 2)
-   ) {
+   )
wakeup_sta_to_xmit(padapter, psta);
-   }
}
}
 
@@ -536,15 +535,13 @@ void update_sta_info_apmode(struct adapter *padapter, 
struct sta_info *psta)
 
/*  B0 Config LDPC Coding Capability */
if (TEST_FLAG(phtpriv_ap->ldpc_cap, LDPC_HT_ENABLE_TX) &&
- GET_HT_CAPABILITY_ELE_LDPC_CAP((u8 
*)(_sta->ht_cap))) {
+ GET_HT_CAPABILITY_ELE_LDPC_CAP((u8 
*)(_sta->ht_cap)))
SET_FLAG(cur_ldpc_cap, (LDPC_HT_ENABLE_TX | 
LDPC_HT_CAP_TX));
-   }
 
/*  B7 B8 B9 Config STBC setting */
if (TEST_FLAG(phtpriv_ap->stbc_cap, STBC_HT_ENABLE_TX) &&
- GET_HT_CAPABILITY_ELE_RX_STBC((u8 
*)(_sta->ht_cap))) {
+ GET_HT_CAPABILITY_ELE_RX_STBC((u8 
*)(_sta->ht_cap)))
SET_FLAG(cur_stbc_cap, (STBC_HT_ENABLE_TX | 
STBC_HT_CAP_TX));
-   }
} else {
phtpriv_sta->ampdu_enable = false;
 
diff --git a/drivers/staging/rtl8723bs/core/rtw_btcoex.c 
b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
index ebdbd328b62c..62cbf84b079a 100644
--- a/drivers/staging/rtl8723bs/core/rtw_btcoex.c
+++ b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
@@ -21,13 +21,11 @@ void rtw_btcoex_MediaStatusNotify(struct adapter *padapter, 
u8 mediaStatus)
 
 void rtw_btcoex_HaltNotify(struct adapter *padapter)
 {
-   if (!padapter->bup) {
+   if (!padapter->bup)
return;
-   }
 
-   if (padapter->bSurpriseRemoved) {
+   if (padapter->bSurpriseRemoved)
return;
-   }
 
hal_btcoex_HaltNotify(padapter);
 }
diff --git a/drivers/staging/rtl8723bs/core/rtw_cmd.c 
b/drivers/staging/rtl8723bs/core/rtw_cmd.c
index c29cd23b74a0..cc00bd4f4bc6 100644
--- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
+++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
@@ -313,9 +313,9 @@ int rtw_cmd_filter(struct cmd_priv *pcmdpriv, struct 
cmd_obj *cmd_obj)
 
if ((pcmdpriv->padapter->hw_init_completed == false && bAllow == false)
|| atomic_read(&(pcmdpriv->cmdthd_running)) == false/* 
com_thread not running */
-   ) {
+   )
return _FAIL;
-   }
+
return _SUCCESS;
 }
 
@@ -419,9 +419,8 @@ int rtw_cmd_thread(void *context)
break;
}
 
-   if (list_empty(&(pcmdpriv->cmd_queue.queue))) {
+   if (list_empty(&(pcmdpriv->cmd_queue.queue)))