summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/realtek/rtlwifi
diff options
context:
space:
mode:
authorAditya Srivastava <yashsri421@gmail.com>2021-01-10 15:15:21 +0300
committerKalle Valo <kvalo@codeaurora.org>2021-01-25 17:21:01 +0300
commitd8cbaa3de403af6a9cf56598171d2c130ef56f0d (patch)
tree43b15380efdd95e92a770ec2589f9e52889acdc2 /drivers/net/wireless/realtek/rtlwifi
parent07ceefa3012f43512e93931980bd3bdf5af96344 (diff)
downloadlinux-d8cbaa3de403af6a9cf56598171d2c130ef56f0d.tar.xz
rtlwifi: rtl_pci: fix bool comparison in expressions
There are certain conditional expressions in rtl_pci, 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 E.g., in drivers/net/wireless/realtek/rtlwifi/ps.c, "if (find_p2p_ie == true)" can be replaced with "if (find_p2p_ie)" 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-2-yashsri421@gmail.com
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi')
-rw-r--r--drivers/net/wireless/realtek/rtlwifi/ps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/ps.c b/drivers/net/wireless/realtek/rtlwifi/ps.c
index f99882255d48..629c03271bde 100644
--- a/drivers/net/wireless/realtek/rtlwifi/ps.c
+++ b/drivers/net/wireless/realtek/rtlwifi/ps.c
@@ -798,9 +798,9 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
ie += 3 + noa_len;
}
- if (find_p2p_ie == true) {
+ if (find_p2p_ie) {
if ((p2pinfo->p2p_ps_mode > P2P_PS_NONE) &&
- (find_p2p_ps_ie == false))
+ (!find_p2p_ps_ie))
rtl_p2p_ps_cmd(hw, P2P_PS_DISABLE);
}
}