linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] include:libata: fix boolreturn.cocci warnings
@ 2021-08-24  6:07 CGEL
  2021-08-24 16:11 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: CGEL @ 2021-08-24  6:07 UTC (permalink / raw)
  To: Jens Axboe; +Cc: linux-ide, linux-kernel, Jing Yangyang, Zeal Robot

From: Jing Yangyang <jing.yangyang@zte.com.cn>

./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 <zealci@zte.com.cn>
Signed-off-by: Jing Yangyang <jing.yangyang@zte.com.cn>
---
 include/linux/libata.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/libata.h b/include/linux/libata.h
index a2d1bae..860e63f 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -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 */
 
-- 
1.8.3.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-24 16:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-24  6:07 [PATCH linux-next] include:libata: fix boolreturn.cocci warnings CGEL
2021-08-24 16:11 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).