Skip to contentSkip to conversation

xen-netback: use true and false for boolean values

PATCH Applied Gustavo A. R. Silva 3 participants 5 messages Aug 2, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen-netback: use true and false for boolean values

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

This issue was detected with the help of Coccinelle.

---
 drivers/net/xen-netback/netback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/xen-netback/netback.c +2 -2
index a27daa2..3621e05 100644
@@ -1603,9 +1603,9 @@ static void xenvif_ctrl_action(struct xenvif *vif)
 static bool xenvif_ctrl_work_todo(struct xenvif *vif)
 {
 	if (likely(RING_HAS_UNCONSUMED_REQUESTS(&vif->ctrl)))
-		return 1;
+		return true;
 
-	return 0;
+	return false;
 }
 
 irqreturn_t xenvif_ctrl_irq_fn(int irq, void *data)
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 6 lines · Gustavo A. R. Silva

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

This issue was detected with the help of Coccinelle.

Thanks for the patch.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

maintainer Applied
#4 lore raw
In reply to Gustavo A. R. Silva

From: "Gustavo A. R. Silva" <[email protected]>
Date: Wed, 1 Aug 2018 19:31:01 -0500

Quoted 6 lines

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

This issue was detected with the help of Coccinelle.

Applied.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel