[PATCH v2] rtw88: Simplify bool comparison

Subsystems: realtek wireless driver (rtw88), the rest

STALE2038d LANDED

Landed in mainline as d3a78c7a9daa on 2021-01-14.

2 messages, 2 authors, 2021-01-14 · open the first message on its own page

[PATCH v2] rtw88: Simplify bool comparison

From: YANG LI <hidden>
Date: 2021-01-12 09:51:58

Fix the following coccicheck warning:
 ./drivers/net/wireless/realtek/rtw88/debug.c:800:17-23: WARNING:
Comparison of 0/1 to bool variable

Reported-by: Abaci Robot <redacted>
Signed-off-by: YANG LI <redacted>
---
Changes in v2:

make "rtw88:" as subject prefix

 drivers/net/wireless/realtek/rtw88/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c
index 19fc2d8..948cb79 100644
--- a/drivers/net/wireless/realtek/rtw88/debug.c
+++ b/drivers/net/wireless/realtek/rtw88/debug.c
@@ -800,7 +800,7 @@ static ssize_t rtw_debugfs_set_coex_enable(struct file *filp,
 	}
 
 	mutex_lock(&rtwdev->mutex);
-	coex->manual_control = enable == 0;
+	coex->manual_control = !enable;
 	mutex_unlock(&rtwdev->mutex);
 
 	return count;
-- 
1.8.3.1

Re: [PATCH v2] rtw88: Simplify bool comparison

From: Kalle Valo <hidden>
Date: 2021-01-14 17:29:02

YANG LI [off-list ref] wrote:
Fix the following coccicheck warning:
 ./drivers/net/wireless/realtek/rtw88/debug.c:800:17-23: WARNING:
Comparison of 0/1 to bool variable

Reported-by: Abaci Robot <redacted>
Signed-off-by: YANG LI <redacted>
Patch applied to wireless-drivers-next.git, thanks.

d3a78c7a9daa rtw88: Simplify bool comparison

-- 
https://patchwork.kernel.org/project/linux-wireless/patch/1610445040-23599-1-git-send-email-abaci-bugfix@linux.alibaba.com/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help