2021-01-11 09:24:53

by Abaci Team

[permalink] [raw]
Subject: [PATCH] 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

Signed-off-by: YANG LI <[email protected]>
Reported-by: Abaci Robot<[email protected]>
---
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


2021-01-12 11:10:05

by Ping-Ke Shih

[permalink] [raw]
Subject: Re: [PATCH] rtw88: debug: style: Simplify bool comparison

On Mon, 2021-01-11 at 09:22 +0000, YANG LI wrote:
> Fix the following coccicheck warning:
>  ./drivers/net/wireless/realtek/rtw88/debug.c:800:17-23: WARNING:
> Comparison of 0/1 to bool variable
>
> Signed-off-by: YANG LI <[email protected]>
> Reported-by: Abaci Robot<[email protected]>---
>  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