Skip to content

Commit

Permalink
rtlwifi: rtl8821ae: use true,false for bool variable large_cfo_hit
Browse files Browse the repository at this point in the history
This addresses the following coccinelle warning:

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:2680:27-47: WARNING:
Comparison of 0/1 to bool variable
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:2683:3-23: WARNING:
Assignment of 0/1 to bool variable
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c:2686:3-23: WARNING:
Assignment of 0/1 to bool variable

Reported-by: Hulk Robot <[email protected]>
Signed-off-by: Jason Yan <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
JasonYanHw authored and Kalle Valo committed Sep 22, 2020
1 parent a03efb4 commit ff4d1d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/net/wireless/realtek/rtlwifi/rtl8821ae/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2677,13 +2677,13 @@ static void rtl8821ae_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) {
if (cfo_ave_diff > 20 && !rtldm->large_cfo_hit) {
rtl_dbg(rtlpriv, COMP_DIG, DBG_LOUD,
"first large CFO hit\n");
rtldm->large_cfo_hit = 1;
rtldm->large_cfo_hit = true;
return;
} else
rtldm->large_cfo_hit = 0;
rtldm->large_cfo_hit = false;

rtldm->cfo_ave_pre = cfo_ave;

Expand Down

0 comments on commit ff4d1d7

Please sign in to comment.