]> Git Repo - linux.git/commitdiff
include:libata: fix boolreturn.cocci warnings
authorJing Yangyang <[email protected]>
Tue, 24 Aug 2021 06:07:02 +0000 (23:07 -0700)
committerJens Axboe <[email protected]>
Tue, 24 Aug 2021 16:11:21 +0000 (10:11 -0600)
./include/linux/libata.h:1462:8-9:WARNING: return of 0/1 in function
'ata_is_host_link' with return type bool

Return statements in functions returning bool should use true/false
instead of 1/0.

Generated by: scripts/coccinelle/misc/boolreturn.cocci

Reported-by: Zeal Robot <[email protected]>
Signed-off-by: Jing Yangyang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
include/linux/libata.h

index a2d1bae7900b1b9ed8f4af0f27f3592cf126b523..860e63f5667bc760a8f829ea8a54985c8f516e7f 100644 (file)
@@ -1459,7 +1459,7 @@ static inline bool sata_pmp_attached(struct ata_port *ap)
 
 static inline bool ata_is_host_link(const struct ata_link *link)
 {
-       return 1;
+       return true;
 }
 #endif /* CONFIG_SATA_PMP */
 
This page took 0.071938 seconds and 4 git commands to generate.