wireless: realtek: Simplify bool comparison
PATCH 1/1 wireless: realtek: Simplify bool comparison
Fix the following coccicheck warning:
./drivers/net/wireless/realtek/rtlwifi/ps.c:803:7-21: WARNING:
Comparison to bool
Reported-by Abaci Robot <[email protected]>
Signed-off-by YANG LI <[email protected]>
--- drivers/net/wireless/realtek/rtlwifi/ps.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/realtek/rtlwifi/ps.c +2 -2
@@ -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 ); } }
Signature · 1 line
1.8.3.1
Pkshih
maintainerQuoted 25 lines · YANG LI
Fix the following coccicheck warning:
./drivers/net/wireless/realtek/rtlwifi/ps.c:803:7-21: WARNING:
Comparison to boolReported-by Abaci Robot <[email protected]>Signed-off-by YANG LI <[email protected]>---
drivers/net/wireless/realtek/rtlwifi/ps.c | 4 ++--1 file changed, 2 insertions(+), 2 deletions(-)drivers/net/wireless/realtek/rtlwifi/ps.c +0
-0@@ -798,9 +798,9 @@ static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, ie += 3 + noa_len; }drivers/net/wireless/realtek/rtlwifi/ps.c +1
-1-if (find_p2p_ie == true) { +if (find_p2p_ie) {if ((
p2pinfo->p2p_ps_mode>P2P_PS_NONE) &&drivers/net/wireless/realtek/rtlwifi/ps.c +1
-1- (find_p2p_ps_ie == false)) + (!find_p2p_ps_ie))
Quoted 3 lines
rtl_p2p_ps_cmd(hw, P2P_PS_DISABLE); }
}
The subject prefix should be "rtlwifi:".
And, I think it's ok to merge this patch with another patch ("rtlwifi: rtl8821ae: style: Simplify bool comparison"). Because both of them are trivial fixes and belong to rtlwifi.
---
Ping-Ke