lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Mon, 11 Jan 2021 17:36:55 +0800
From:   YANG LI <abaci-bugfix@...ux.alibaba.com>
To:     axboe@...nel.dk
Cc:     linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org,
        YANG LI <abaci-bugfix@...ux.alibaba.com>
Subject: [PATCH] ata: style: Simplify bool comparison

Fix the following coccicheck warning:
./include/linux/ata.h:621:5-25: WARNING: Comparison of 0/1 to bool
variable

Signed-off-by: YANG LI <abaci-bugfix@...ux.alibaba.com>
Reported-by: Abaci Robot<abaci@...ux.alibaba.com>
---
 include/linux/ata.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/ata.h b/include/linux/ata.h
index 6e67ade..89245f3 100644
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -618,7 +618,7 @@ static inline bool ata_id_has_flush(const u16 *id)
 
 static inline bool ata_id_flush_enabled(const u16 *id)
 {
-	if (ata_id_has_flush(id) == 0)
+	if (!ata_id_has_flush(id))
 		return false;
 	if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000)
 		return false;
-- 
1.8.3.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ