netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] rtw88: debug: style: Simplify bool comparison
@ 2021-01-11  9:22 YANG LI
  2021-01-12  2:20 ` Pkshih
  0 siblings, 1 reply; 2+ messages in thread
From: YANG LI @ 2021-01-11  9:22 UTC (permalink / raw)
  To: tony0620emma
  Cc: kvalo, davem, kuba, linux-wireless, netdev, linux-kernel, 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

Signed-off-by: YANG LI <abaci-bugfix@linux.alibaba.com>
Reported-by: Abaci Robot<abaci@linux.alibaba.com>
---
 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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rtw88: debug: style: Simplify bool comparison
  2021-01-11  9:22 [PATCH] rtw88: debug: style: Simplify bool comparison YANG LI
@ 2021-01-12  2:20 ` Pkshih
  0 siblings, 0 replies; 2+ messages in thread
From: Pkshih @ 2021-01-12  2:20 UTC (permalink / raw)
  To: tony0620emma, abaci-bugfix
  Cc: linux-wireless, kvalo, davem, linux-kernel, kuba, netdev

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 <abaci-bugfix@linux.alibaba.com>
> Reported-by: Abaci Robot<abaci@linux.alibaba.com>---
>  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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-12  2:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11  9:22 [PATCH] rtw88: debug: style: Simplify bool comparison YANG LI
2021-01-12  2:20 ` Pkshih

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).