Skip to contentSkip to conversation

rtw88: debug: style: Simplify bool comparison

PATCH Superseded YANG LI 2 participants 2 messages Jan 11, 2021 – Jan 12, 2021

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

YANG LI

author
#0 lore raw

PATCH 1/1 rtw88: debug: style: Simplify bool comparison

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

---
 drivers/net/wireless/realtek/rtw88/debug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/realtek/rtw88/debug.c +1 -1
index 19fc2d8..948cb79 100644
@@ -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;
Signature · 1 line
1.8.3.1
maintainer
#1 lore raw
Quoted 10 lines · YANG LI

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

 drivers/net/wireless/realtek/rtw88/debug.c | 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)

I think that "rtw88:" or "rtw88: debug:" as subject prefix is enough. Others are good to me.

---
Ping-Ke