* [PATCH 10/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone
@ 2019-06-29 10:37 Hariprasad Kelam
2019-06-30 1:29 ` Shobhit Kukreti
0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-06-29 10:37 UTC (permalink / raw)
To: Greg Kroah-Hartman, Nishka Dasgupta, Himadri Pandya,
Hariprasad Kelam, Dan Carpenter, Hardik Singh Rathore,
Shobhit Kukreti, devel, linux-kernel
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/hal_btcoex.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
index 66caf34..99e0b91 100644
--- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
+++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
@@ -290,7 +290,7 @@ static u8 halbtcoutsrc_IsWifiBusy(struct adapter *padapter)
if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == true) {
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
return true;
- if (true == pmlmepriv->LinkDetectInfo.bBusyTraffic)
+ if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
return true;
}
@@ -310,12 +310,12 @@ static u32 _halbtcoutsrc_GetWifiLinkStatus(struct adapter *padapter)
if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == true) {
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
- if (true == bp2p)
+ if (bp2p)
portConnectedStatus |= WIFI_P2P_GO_CONNECTED;
else
portConnectedStatus |= WIFI_AP_CONNECTED;
} else {
- if (true == bp2p)
+ if (bp2p)
portConnectedStatus |= WIFI_P2P_GC_CONNECTED;
else
portConnectedStatus |= WIFI_STA_CONNECTED;
@@ -372,7 +372,7 @@ static u8 halbtcoutsrc_GetWifiScanAPNum(struct adapter *padapter)
pmlmeext = &padapter->mlmeextpriv;
- if (GLBtcWiFiInScanState == false) {
+ if (!GLBtcWiFiInScanState) {
if (pmlmeext->sitesurvey_res.bss_cnt > 0xFF)
scan_AP_num = 0xFF;
else
@@ -1444,7 +1444,7 @@ void hal_btcoex_IQKNotify(struct adapter *padapter, u8 state)
void hal_btcoex_BtInfoNotify(struct adapter *padapter, u8 length, u8 *tmpBuf)
{
- if (GLBtcWiFiInIQKState == true)
+ if (GLBtcWiFiInIQKState)
return;
EXhalbtcoutsrc_BtInfoNotify(&GLBtCoexist, tmpBuf, length);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 10/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone
2019-06-29 10:37 [PATCH 10/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone Hariprasad Kelam
@ 2019-06-30 1:29 ` Shobhit Kukreti
0 siblings, 0 replies; 2+ messages in thread
From: Shobhit Kukreti @ 2019-06-30 1:29 UTC (permalink / raw)
To: Hariprasad Kelam
Cc: Greg Kroah-Hartman, Nishka Dasgupta, Himadri Pandya,
Dan Carpenter, Hardik Singh Rathore, devel, linux-kernel
On Sat, Jun 29, 2019 at 04:07:51PM +0530, Hariprasad Kelam wrote:
Hello Hari Prasad,
Please add the recommended reviewers mentioned in the TODO file of
rtl8723bs directory.
I see the following emails in the TODO file.
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans de Goede <hdegoede@redhat.com> and Larry Finger
<Larry.Finger@lwfinger.net>
> 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/hal_btcoex.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/staging/rtl8723bs/hal/hal_btcoex.c b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
> index 66caf34..99e0b91 100644
> --- a/drivers/staging/rtl8723bs/hal/hal_btcoex.c
> +++ b/drivers/staging/rtl8723bs/hal/hal_btcoex.c
> @@ -290,7 +290,7 @@ static u8 halbtcoutsrc_IsWifiBusy(struct adapter *padapter)
> if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == true) {
> if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
> return true;
> - if (true == pmlmepriv->LinkDetectInfo.bBusyTraffic)
> + if (pmlmepriv->LinkDetectInfo.bBusyTraffic)
> return true;
> }
>
> @@ -310,12 +310,12 @@ static u32 _halbtcoutsrc_GetWifiLinkStatus(struct adapter *padapter)
>
> if (check_fwstate(pmlmepriv, WIFI_ASOC_STATE) == true) {
> if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
> - if (true == bp2p)
> + if (bp2p)
> portConnectedStatus |= WIFI_P2P_GO_CONNECTED;
> else
> portConnectedStatus |= WIFI_AP_CONNECTED;
> } else {
> - if (true == bp2p)
> + if (bp2p)
> portConnectedStatus |= WIFI_P2P_GC_CONNECTED;
> else
> portConnectedStatus |= WIFI_STA_CONNECTED;
> @@ -372,7 +372,7 @@ static u8 halbtcoutsrc_GetWifiScanAPNum(struct adapter *padapter)
>
> pmlmeext = &padapter->mlmeextpriv;
>
> - if (GLBtcWiFiInScanState == false) {
> + if (!GLBtcWiFiInScanState) {
> if (pmlmeext->sitesurvey_res.bss_cnt > 0xFF)
> scan_AP_num = 0xFF;
> else
> @@ -1444,7 +1444,7 @@ void hal_btcoex_IQKNotify(struct adapter *padapter, u8 state)
>
> void hal_btcoex_BtInfoNotify(struct adapter *padapter, u8 length, u8 *tmpBuf)
> {
> - if (GLBtcWiFiInIQKState == true)
> + if (GLBtcWiFiInIQKState)
> return;
>
> EXhalbtcoutsrc_BtInfoNotify(&GLBtCoexist, tmpBuf, length);
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-30 1:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-29 10:37 [PATCH 10/10] staging/rtl8723bs/hal: fix comparison to true/false is error prone Hariprasad Kelam
2019-06-30 1:29 ` Shobhit Kukreti
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).