2020-09-19 07:45:07

by Jason Yan

[permalink] [raw]
Subject: [PATCH] rtlwifi: rtl8723be: use true,false for bool variable large_cfo_hit

This addresses the following coccinelle warning:

drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1155:27-47: WARNING:
Comparison of 0/1 to bool variable
drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1156:3-23: WARNING:
Assignment of 0/1 to bool variable
drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1159:3-23: WARNING:
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
---
drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c
index fbcff23eb058..c3c990cc032f 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c
@@ -1152,11 +1152,11 @@ static void rtl8723be_dm_dynamic_atc_switch(struct ieee80211_hw *hw)
(rtldm->cfo_ave_pre - cfo_ave) :
(cfo_ave - rtldm->cfo_ave_pre);

- if (cfo_ave_diff > 20 && rtldm->large_cfo_hit == 0) {
- rtldm->large_cfo_hit = 1;
+ if (cfo_ave_diff > 20 && !rtldm->large_cfo_hit) {
+ rtldm->large_cfo_hit = true;
return;
} else
- rtldm->large_cfo_hit = 0;
+ rtldm->large_cfo_hit = false;

rtldm->cfo_ave_pre = cfo_ave;

--
2.25.4


2020-09-22 07:21:29

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] rtlwifi: rtl8723be: use true,false for bool variable large_cfo_hit

Jason Yan <[email protected]> wrote:

> This addresses the following coccinelle warning:
>
> drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1155:27-47: WARNING:
> Comparison of 0/1 to bool variable
> drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1156:3-23: WARNING:
> Assignment of 0/1 to bool variable
> drivers/net/wireless/realtek/rtlwifi/rtl8723be/dm.c:1159:3-23: WARNING:
> Assignment of 0/1 to bool variable
>
> Reported-by: Hulk Robot <[email protected]>
> Signed-off-by: Jason Yan <[email protected]>

Patch applied to wireless-drivers-next.git, thanks.

dd7a3a331f5d rtlwifi: rtl8723be: use true,false for bool variable large_cfo_hit

--
https://patchwork.kernel.org/patch/11786683/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches