From: Hariprasad Kelam <hariprasad.kelam@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hariprasad Kelam <hariprasad.kelam@gmail.com>,
Colin Ian King <colin.king@canonical.com>,
Puranjay Mohan <puranjay12@gmail.com>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 05/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone
Date: Sat, 29 Jun 2019 15:54:07 +0530 [thread overview]
Message-ID: <20190629102407.GA15143@hari-Inspiron-1545> (raw)
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 <hariprasad.kelam@gmail.com>
---
drivers/staging/rtl8723bs/hal/odm_DIG.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/odm_DIG.c b/drivers/staging/rtl8723bs/hal/odm_DIG.c
index 70d98c5..dbfb05e 100644
--- a/drivers/staging/rtl8723bs/hal/odm_DIG.c
+++ b/drivers/staging/rtl8723bs/hal/odm_DIG.c
@@ -95,7 +95,7 @@ void odm_NHMBB(void *pDM_VOID)
if ((pDM_Odm->NHMCurTxOkcnt) + 1 > (u64)(pDM_Odm->NHMCurRxOkcnt<<2) + 1) { /* Tx > 4*Rx possible for adaptivity test */
- if (pDM_Odm->NHM_cnt_0 >= 190 || pDM_Odm->adaptivity_flag == true) {
+ if (pDM_Odm->NHM_cnt_0 >= 190 || pDM_Odm->adaptivity_flag) {
/* Enable EDCCA since it is possible running Adaptivity testing */
/* test_status = 1; */
pDM_Odm->adaptivity_flag = true;
@@ -112,7 +112,7 @@ void odm_NHMBB(void *pDM_VOID)
}
}
} else { /* TX<RX */
- if (pDM_Odm->adaptivity_flag == true && pDM_Odm->NHM_cnt_0 <= 200) {
+ if (pDM_Odm->adaptivity_flag && pDM_Odm->NHM_cnt_0 <= 200) {
/* test_status = 2; */
pDM_Odm->tolerance_cnt = 0;
} else {
@@ -207,7 +207,7 @@ void odm_AdaptivityInit(void *pDM_VOID)
{
PDM_ODM_T pDM_Odm = (PDM_ODM_T)pDM_VOID;
- if (pDM_Odm->Carrier_Sense_enable == false)
+ if (!pDM_Odm->Carrier_Sense_enable)
pDM_Odm->TH_L2H_ini = 0xf7; /* -7 */
else
pDM_Odm->TH_L2H_ini = 0xa;
@@ -257,7 +257,7 @@ void odm_Adaptivity(void *pDM_VOID, u8 IGI)
pDM_Odm->IGI_target = (u8) IGI_target;
/* Search pwdB lower bound */
- if (pDM_Odm->TxHangFlg == true) {
+ if (pDM_Odm->TxHangFlg) {
PHY_SetBBReg(pDM_Odm->Adapter, ODM_REG_DBG_RPT_11N, bMaskDWord, 0x208);
odm_SearchPwdBLowerBound(pDM_Odm, pDM_Odm->IGI_target);
}
@@ -456,7 +456,7 @@ bool odm_DigAbort(void *pDM_VOID)
}
/* add by Neil Chen to avoid PSD is processing */
- if (pDM_Odm->bDMInitialGainEnable == false) {
+ if (!pDM_Odm->bDMInitialGainEnable) {
ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG(): Return: PSD is Processing\n"));
return true;
}
@@ -525,7 +525,7 @@ void odm_DIG(void *pDM_VOID)
ODM_RT_TRACE(pDM_Odm, ODM_COMP_DIG, ODM_DBG_LOUD, ("odm_DIG() ===========================>\n\n"));
- if (pDM_Odm->adaptivity_flag == true)
+ if (pDM_Odm->adaptivity_flag)
Adap_IGI_Upper = pDM_Odm->Adaptivity_IGI_upper;
--
2.7.4
reply other threads:[~2019-06-29 10:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190629102407.GA15143@hari-Inspiron-1545 \
--to=hariprasad.kelam@gmail.com \
--cc=colin.king@canonical.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=puranjay12@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).