Skip to contentSkip to conversation

ata: style: Simplify bool comparison

PATCH New YANG LI 1 participant 1 message Jan 11, 2021 libata

lore
Share & tools
lore

YANG LI

author
#0 lore raw

PATCH 1/1 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

---
 include/linux/ata.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/ata.h +1 -1
index 6e67ade..89245f3 100644
@@ -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;
Signature · 1 line
1.8.3.1