Re: [PATCH] staging: rtl8723bs: fix comparsion to true/false and brace issues

2018-06-30 Thread Michael Straube

On 06/30/18 12:08, Andreas Schwab wrote:

On Jun 30 2018, Michael Straube  wrote:


@@ -115,11 +115,10 @@ s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter 
*padapter)
  
  void rtw_btcoex_SetManualControl(struct adapter *padapter, u8 manual)

  {
-   if (true == manual) {
+   if (manual)
hal_btcoex_SetManualControl(padapter, true);
-   } else{
+   else
hal_btcoex_SetManualControl(padapter, false);
-   }


aka. hal_btcoex_SetManualControl(padapter, manual);

Andreas.



Ah, thanks!

Michael


Re: [PATCH] staging: rtl8723bs: fix comparsion to true/false and brace issues

2018-06-30 Thread Michael Straube

On 06/30/18 12:08, Andreas Schwab wrote:

On Jun 30 2018, Michael Straube  wrote:


@@ -115,11 +115,10 @@ s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter 
*padapter)
  
  void rtw_btcoex_SetManualControl(struct adapter *padapter, u8 manual)

  {
-   if (true == manual) {
+   if (manual)
hal_btcoex_SetManualControl(padapter, true);
-   } else{
+   else
hal_btcoex_SetManualControl(padapter, false);
-   }


aka. hal_btcoex_SetManualControl(padapter, manual);

Andreas.



Ah, thanks!

Michael


Re: [PATCH] staging: rtl8723bs: fix comparsion to true/false and brace issues

2018-06-30 Thread Andreas Schwab
On Jun 30 2018, Michael Straube  wrote:

> @@ -115,11 +115,10 @@ s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter 
> *padapter)
>  
>  void rtw_btcoex_SetManualControl(struct adapter *padapter, u8 manual)
>  {
> - if (true == manual) {
> + if (manual)
>   hal_btcoex_SetManualControl(padapter, true);
> - } else{
> + else
>   hal_btcoex_SetManualControl(padapter, false);
> - }

aka. hal_btcoex_SetManualControl(padapter, manual);

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


Re: [PATCH] staging: rtl8723bs: fix comparsion to true/false and brace issues

2018-06-30 Thread Andreas Schwab
On Jun 30 2018, Michael Straube  wrote:

> @@ -115,11 +115,10 @@ s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter 
> *padapter)
>  
>  void rtw_btcoex_SetManualControl(struct adapter *padapter, u8 manual)
>  {
> - if (true == manual) {
> + if (manual)
>   hal_btcoex_SetManualControl(padapter, true);
> - } else{
> + else
>   hal_btcoex_SetManualControl(padapter, false);
> - }

aka. hal_btcoex_SetManualControl(padapter, manual);

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."


[PATCH] staging: rtl8723bs: fix comparsion to true/false and brace issues

2018-06-30 Thread Michael Straube
Use if(x) and if(!x) instead of comparsion to true/false.
Reported by checkpatch.

Remove unrequired braces from single if else statements.
Add missing space after else: else{ -> else {

Signed-off-by: Michael Straube 
---
 drivers/staging/rtl8723bs/core/rtw_btcoex.c | 13 ++---
 drivers/staging/rtl8723bs/core/rtw_efuse.c  |  5 ++---
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_btcoex.c 
b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
index adac915a2153..922628c59f80 100644
--- a/drivers/staging/rtl8723bs/core/rtw_btcoex.c
+++ b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
@@ -77,14 +77,14 @@ void rtw_btcoex_SuspendNotify(struct adapter *padapter, u8 
state)
 
 void rtw_btcoex_HaltNotify(struct adapter *padapter)
 {
-   if (false == padapter->bup) {
+   if (!padapter->bup) {
DBG_871X(FUNC_ADPT_FMT ": bup =%d Skip!\n",
FUNC_ADPT_ARG(padapter), padapter->bup);
 
return;
}
 
-   if (true == padapter->bSurpriseRemoved) {
+   if (padapter->bSurpriseRemoved) {
DBG_871X(FUNC_ADPT_FMT ": bSurpriseRemoved =%d Skip!\n",
FUNC_ADPT_ARG(padapter), padapter->bSurpriseRemoved);
 
@@ -115,11 +115,10 @@ s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter 
*padapter)
 
 void rtw_btcoex_SetManualControl(struct adapter *padapter, u8 manual)
 {
-   if (true == manual) {
+   if (manual)
hal_btcoex_SetManualControl(padapter, true);
-   } else{
+   else
hal_btcoex_SetManualControl(padapter, false);
-   }
 }
 
 u8 rtw_btcoex_IsBtControlLps(struct adapter *padapter)
@@ -198,11 +197,11 @@ void rtw_btcoex_RejectApAggregatedPacket(struct adapter 
*padapter, u8 enable)
pmlmeinfo = >mlmeextpriv.mlmext_info;
psta = rtw_get_stainfo(>stapriv, 
get_bssid(>mlmepriv));
 
-   if (true == enable) {
+   if (enable) {
pmlmeinfo->accept_addba_req = false;
if (psta)
send_delba(padapter, 0, psta->hwaddr);
-   } else{
+   } else {
pmlmeinfo->accept_addba_req = true;
}
 }
diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c 
b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index c306ad7e395c..b3247c9642ea 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -580,11 +580,10 @@ void EFUSE_ShadowMapUpdate(
 
EFUSE_GetEfuseDefinition(padapter, efuseType, TYPE_EFUSE_MAP_LEN, (void 
*), bPseudoTest);
 
-   if (pEEPROM->bautoload_fail_flag == true) {
+   if (pEEPROM->bautoload_fail_flag)
memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
-   } else{
+   else
Efuse_ReadAllMap(padapter, efuseType, 
pEEPROM->efuse_eeprom_data, bPseudoTest);
-   }
 
/* PlatformMoveMemory((void *)>EfuseMap[EFUSE_MODIFY_MAP][0], 
*/
/* void *)>EfuseMap[EFUSE_INIT_MAP][0], mapLen); */
-- 
2.18.0



[PATCH] staging: rtl8723bs: fix comparsion to true/false and brace issues

2018-06-30 Thread Michael Straube
Use if(x) and if(!x) instead of comparsion to true/false.
Reported by checkpatch.

Remove unrequired braces from single if else statements.
Add missing space after else: else{ -> else {

Signed-off-by: Michael Straube 
---
 drivers/staging/rtl8723bs/core/rtw_btcoex.c | 13 ++---
 drivers/staging/rtl8723bs/core/rtw_efuse.c  |  5 ++---
 2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_btcoex.c 
b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
index adac915a2153..922628c59f80 100644
--- a/drivers/staging/rtl8723bs/core/rtw_btcoex.c
+++ b/drivers/staging/rtl8723bs/core/rtw_btcoex.c
@@ -77,14 +77,14 @@ void rtw_btcoex_SuspendNotify(struct adapter *padapter, u8 
state)
 
 void rtw_btcoex_HaltNotify(struct adapter *padapter)
 {
-   if (false == padapter->bup) {
+   if (!padapter->bup) {
DBG_871X(FUNC_ADPT_FMT ": bup =%d Skip!\n",
FUNC_ADPT_ARG(padapter), padapter->bup);
 
return;
}
 
-   if (true == padapter->bSurpriseRemoved) {
+   if (padapter->bSurpriseRemoved) {
DBG_871X(FUNC_ADPT_FMT ": bSurpriseRemoved =%d Skip!\n",
FUNC_ADPT_ARG(padapter), padapter->bSurpriseRemoved);
 
@@ -115,11 +115,10 @@ s32 rtw_btcoex_IsBTCoexCtrlAMPDUSize(struct adapter 
*padapter)
 
 void rtw_btcoex_SetManualControl(struct adapter *padapter, u8 manual)
 {
-   if (true == manual) {
+   if (manual)
hal_btcoex_SetManualControl(padapter, true);
-   } else{
+   else
hal_btcoex_SetManualControl(padapter, false);
-   }
 }
 
 u8 rtw_btcoex_IsBtControlLps(struct adapter *padapter)
@@ -198,11 +197,11 @@ void rtw_btcoex_RejectApAggregatedPacket(struct adapter 
*padapter, u8 enable)
pmlmeinfo = >mlmeextpriv.mlmext_info;
psta = rtw_get_stainfo(>stapriv, 
get_bssid(>mlmepriv));
 
-   if (true == enable) {
+   if (enable) {
pmlmeinfo->accept_addba_req = false;
if (psta)
send_delba(padapter, 0, psta->hwaddr);
-   } else{
+   } else {
pmlmeinfo->accept_addba_req = true;
}
 }
diff --git a/drivers/staging/rtl8723bs/core/rtw_efuse.c 
b/drivers/staging/rtl8723bs/core/rtw_efuse.c
index c306ad7e395c..b3247c9642ea 100644
--- a/drivers/staging/rtl8723bs/core/rtw_efuse.c
+++ b/drivers/staging/rtl8723bs/core/rtw_efuse.c
@@ -580,11 +580,10 @@ void EFUSE_ShadowMapUpdate(
 
EFUSE_GetEfuseDefinition(padapter, efuseType, TYPE_EFUSE_MAP_LEN, (void 
*), bPseudoTest);
 
-   if (pEEPROM->bautoload_fail_flag == true) {
+   if (pEEPROM->bautoload_fail_flag)
memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
-   } else{
+   else
Efuse_ReadAllMap(padapter, efuseType, 
pEEPROM->efuse_eeprom_data, bPseudoTest);
-   }
 
/* PlatformMoveMemory((void *)>EfuseMap[EFUSE_MODIFY_MAP][0], 
*/
/* void *)>EfuseMap[EFUSE_INIT_MAP][0], mapLen); */
-- 
2.18.0