2019-06-14 02:55:33

by Hariprasad Kelam

[permalink] [raw]
Subject: [Patch v2 1/3] staging: rtl8723bs: hal: sdio_halinit: fix comparison to true/false is error prone

fix below issues reported by checkpatch

CHECK: Using comparison to false is error prone
CHECK: Using comparison to true is error prone

Signed-off-by: Hariprasad Kelam <[email protected]>
----
changes in v2: send proper patch without corruption
----
---
drivers/staging/rtl8723bs/hal/sdio_halinit.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/sdio_halinit.c b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
index 3c65a9c..4db3211 100644
--- a/drivers/staging/rtl8723bs/hal/sdio_halinit.c
+++ b/drivers/staging/rtl8723bs/hal/sdio_halinit.c
@@ -26,7 +26,7 @@ static u8 CardEnable(struct adapter *padapter)


rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
- if (bMacPwrCtrlOn == false) {
+ if (!bMacPwrCtrlOn) {
/* RSV_CTRL 0x1C[7:0] = 0x00 */
/* unlock ISO/CLK/Power control register */
rtw_write8(padapter, REG_RSV_CTRL, 0x0);
@@ -127,7 +127,7 @@ u8 _InitPowerOn_8723BS(struct adapter *padapter)

/* only cmd52 can be used before power on(card enable) */
ret = CardEnable(padapter);
- if (ret == false) {
+ if (!ret) {
RT_TRACE(
_module_hci_hal_init_c_,
_drv_emerg_,
@@ -838,7 +838,7 @@ static u32 rtl8723bs_hal_init(struct adapter *padapter)

/* SIC_Init(padapter); */

- if (pwrctrlpriv->reg_rfoff == true)
+ if (pwrctrlpriv->reg_rfoff)
pwrctrlpriv->rf_pwrstate = rf_off;

/* 2010/08/09 MH We need to check if we need to turnon or off RF after detecting */
@@ -1081,7 +1081,7 @@ static void CardDisableRTL8723BSdio(struct adapter *padapter)
ret = false;
rtw_hal_set_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
ret = HalPwrSeqCmdParsing(padapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, rtl8723B_card_disable_flow);
- if (ret == false) {
+ if (!ret) {
DBG_8192C(KERN_ERR "%s: run CARD DISABLE flow fail!\n", __func__);
}
}
@@ -1091,9 +1091,9 @@ static u32 rtl8723bs_hal_deinit(struct adapter *padapter)
struct dvobj_priv *psdpriv = padapter->dvobj;
struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;

- if (padapter->hw_init_completed == true) {
- if (adapter_to_pwrctl(padapter)->bips_processing == true) {
- if (padapter->netif_up == true) {
+ if (padapter->hw_init_completed) {
+ if (adapter_to_pwrctl(padapter)->bips_processing) {
+ if (padapter->netif_up) {
int cnt = 0;
u8 val8 = 0;

@@ -1387,7 +1387,7 @@ static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("+_ReadAdapterInfo8723BS\n"));

/* before access eFuse, make sure card enable has been called */
- if (padapter->hw_init_completed == false)
+ if (!padapter->hw_init_completed)
_InitPowerOn_8723BS(padapter);


@@ -1404,7 +1404,7 @@ static s32 _ReadAdapterInfo8723BS(struct adapter *padapter)
_ReadPROMContent(padapter);
_InitOtherVariable(padapter);

- if (padapter->hw_init_completed == false) {
+ if (!padapter->hw_init_completed) {
rtw_write8(padapter, 0x67, 0x00); /* for BT, Switch Ant control to BT */
CardDisableRTL8723BSdio(padapter);/* for the power consumption issue, wifi ko module is loaded during booting, but wifi GUI is off */
}
--
2.7.4