[PATCH net-next] xen-netback: use true and false for boolean values

Subsystems: networking drivers, the rest, xen network backend driver

STALE2986d

3 messages, 3 authors, 2018-08-02 · open the first message on its own page

[PATCH net-next] xen-netback: use true and false for boolean values

From: Gustavo A. R. Silva <hidden>
Date: 2018-08-02 00:31:07

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.

Signed-off-by: Gustavo A. R. Silva <redacted>
---
 drivers/net/xen-netback/netback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/xen-netback/netback.c b/drivers/net/xen-netback/netback.c
index a27daa2..3621e05 100644
--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -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)
-- 
2.7.4

Re: [PATCH net-next] xen-netback: use true and false for boolean values

From: Wei Liu <hidden>
Date: 2018-08-02 07:55:47

On Wed, Aug 01, 2018 at 07:31:01PM -0500, Gustavo A. R. Silva wrote:
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.

Signed-off-by: Gustavo A. R. Silva <redacted>
Acked-by: Wei Liu <redacted>

Thanks for the patch.

Re: [PATCH net-next] xen-netback: use true and false for boolean values

From: David Miller <davem@davemloft.net>
Date: 2018-08-02 21:43:26

From: "Gustavo A. R. Silva" <redacted>
Date: Wed, 1 Aug 2018 19:31:01 -0500
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.

Signed-off-by: Gustavo A. R. Silva <redacted>
Applied.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help