From: YANG LI Date: Tue, 12 Jan 2021 09:50:40 +0000 (+0800) Subject: rtw88: Simplify bool comparison X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d3a78c7a9daa6c5fa8529c53f07a909745cf7d02;p=linux.git rtw88: 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 Reported-by: Abaci Robot Signed-off-by: YANG LI Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/1610445040-23599-1-git-send-email-abaci-bugfix@linux.alibaba.com --- diff --git a/drivers/net/wireless/realtek/rtw88/debug.c b/drivers/net/wireless/realtek/rtw88/debug.c index 19fc2d8bf3e93..948cb79050ea9 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;