summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
diff options
context:
space:
mode:
authorAditya Srivastava <yashsri421@gmail.com>2021-01-10 17:45:24 +0530
committerKalle Valo <kvalo@codeaurora.org>2021-01-25 16:21:08 +0200
commit33ae4623d544f1b76e0f656fa49e431b4503f23b (patch)
tree2504bcc3af7bd3f27dfff1a987391a3b7ed3f350 /drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
parent64338f0dfd6a3be20453789c6a4b2c7246e2aef8 (diff)
rtlwifi: rtl8192se: fix bool comparison in expressions
There are certain conditional expressions in rtl8192se, where a boolean variable is compared with true/false, in forms such as (foo == true) or (false != bar), which does not comply with checkpatch.pl (CHECK: BOOL_COMPARISON), according to which boolean variables should be themselves used in the condition, rather than comparing with true/false Replace all such expressions with the bool variables appropriately Signed-off-by: Aditya Srivastava <yashsri421@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210110121525.2407-5-yashsri421@gmail.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
index 47fabce5c235..73a5d8a068fc 100644
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192se/hw.c
@@ -458,7 +458,7 @@ static u8 _rtl92se_halset_sysclk(struct ieee80211_hw *hw, u8 data)
tmpvalue = rtl_read_byte(rtlpriv, SYS_CLKR + 1);
bresult = ((tmpvalue & BIT(7)) == (data & BIT(7)));
- if ((data & (BIT(6) | BIT(7))) == false) {
+ if (!(data & (BIT(6) | BIT(7)))) {
waitcount = 100;
tmpvalue = 0;
@@ -1268,7 +1268,7 @@ static u8 _rtl92s_set_sysclk(struct ieee80211_hw *hw, u8 data)
tmp = rtl_read_byte(rtlpriv, SYS_CLKR + 1);
result = ((tmp & BIT(7)) == (data & BIT(7)));
- if ((data & (BIT(6) | BIT(7))) == false) {
+ if (!(data & (BIT(6) | BIT(7)))) {
waitcnt = 100;
tmp = 0;