All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen/biomerge: Use true and false for boolean values
@ 2018-08-05  0:50 Gustavo A. R. Silva
  2018-08-06 11:42 ` Juergen Gross
  2018-08-06 11:42 ` Juergen Gross
  0 siblings, 2 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-05  0:50 UTC (permalink / raw)
  To: Boris Ostrovsky, Juergen Gross
  Cc: xen-devel, linux-kernel, Gustavo A. R. Silva

Return statements in functions returning bool should use true or false
instead of an integer value.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/xen/biomerge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/biomerge.c b/drivers/xen/biomerge.c
index 30d7f52..55ed80c 100644
--- a/drivers/xen/biomerge.c
+++ b/drivers/xen/biomerge.c
@@ -17,7 +17,7 @@ bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
 	 * XXX: Add support for merging bio_vec when using different page
 	 * size in Xen and Linux.
 	 */
-	return 0;
+	return false;
 #endif
 }
 EXPORT_SYMBOL(xen_biovec_phys_mergeable);
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 8+ messages in thread
* [PATCH] xen/biomerge: Use true and false for boolean values
@ 2018-08-05  0:50 Gustavo A. R. Silva
  0 siblings, 0 replies; 8+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-05  0:50 UTC (permalink / raw)
  To: Boris Ostrovsky, Juergen Gross
  Cc: xen-devel, linux-kernel, Gustavo A. R. Silva

Return statements in functions returning bool should use true or false
instead of an integer value.

This code was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 drivers/xen/biomerge.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/xen/biomerge.c b/drivers/xen/biomerge.c
index 30d7f52..55ed80c 100644
--- a/drivers/xen/biomerge.c
+++ b/drivers/xen/biomerge.c
@@ -17,7 +17,7 @@ bool xen_biovec_phys_mergeable(const struct bio_vec *vec1,
 	 * XXX: Add support for merging bio_vec when using different page
 	 * size in Xen and Linux.
 	 */
-	return 0;
+	return false;
 #endif
 }
 EXPORT_SYMBOL(xen_biovec_phys_mergeable);
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

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

end of thread, other threads:[~2018-08-06 21:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-05  0:50 [PATCH] xen/biomerge: Use true and false for boolean values Gustavo A. R. Silva
2018-08-06 11:42 ` Juergen Gross
2018-08-06 11:42 ` Juergen Gross
2018-08-06 12:28   ` Gustavo A. R. Silva
2018-08-06 12:28   ` Gustavo A. R. Silva
2018-08-06 21:29   ` Boris Ostrovsky
2018-08-06 21:29   ` Boris Ostrovsky
  -- strict thread matches above, loose matches on Subject: below --
2018-08-05  0:50 Gustavo A. R. Silva

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.