Commit 33ae4623 authored by Aditya Srivastava's avatar Aditya Srivastava Committed by Kalle Valo

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: default avatarAditya Srivastava <yashsri421@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210110121525.2407-5-yashsri421@gmail.com
parent 64338f0d
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment