* [PATCH] ata: style: Simplify bool comparison
@ 2021-01-11 9:36 YANG LI
0 siblings, 0 replies; only message in thread
From: YANG LI @ 2021-01-11 9:36 UTC (permalink / raw)
To: axboe; +Cc: linux-ide, linux-kernel, YANG LI
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@linux.alibaba.com>
Reported-by: Abaci Robot<abaci@linux.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-11 9:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-11 9:36 [PATCH] ata: style: Simplify bool comparison YANG LI
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.