All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] xen-netback: use true and false for boolean values
@ 2018-08-02  0:31 Gustavo A. R. Silva
  2018-08-02  7:55 ` Wei Liu
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-02  0:31 UTC (permalink / raw)
  To: Wei Liu, Paul Durrant, David S. Miller
  Cc: xen-devel, netdev, linux-kernel, 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.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
---
 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


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

* [PATCH net-next] xen-netback: use true and false for boolean values
@ 2018-08-02  0:31 Gustavo A. R. Silva
  0 siblings, 0 replies; 6+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-02  0:31 UTC (permalink / raw)
  To: Wei Liu, Paul Durrant, David S. Miller
  Cc: xen-devel, Gustavo A. R. Silva, linux-kernel, netdev

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 <gustavo@embeddedor.com>
---
 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


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

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

* Re: [PATCH net-next] xen-netback: use true and false for boolean values
  2018-08-02  0:31 [PATCH net-next] xen-netback: use true and false for boolean values Gustavo A. R. Silva
  2018-08-02  7:55 ` Wei Liu
@ 2018-08-02  7:55 ` Wei Liu
  2018-08-02 21:43 ` David Miller
  2018-08-02 21:43 ` David Miller
  3 siblings, 0 replies; 6+ messages in thread
From: Wei Liu @ 2018-08-02  7:55 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Wei Liu, netdev, linux-kernel, Paul Durrant, xen-devel,
	David S. Miller

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 <gustavo@embeddedor.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

Thanks for the patch.

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

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

* Re: [PATCH net-next] xen-netback: use true and false for boolean values
  2018-08-02  0:31 [PATCH net-next] xen-netback: use true and false for boolean values Gustavo A. R. Silva
@ 2018-08-02  7:55 ` Wei Liu
  2018-08-02  7:55 ` Wei Liu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Wei Liu @ 2018-08-02  7:55 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Wei Liu, Paul Durrant, David S. Miller, xen-devel, netdev,
	linux-kernel

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 <gustavo@embeddedor.com>

Acked-by: Wei Liu <wei.liu2@citrix.com>

Thanks for the patch.

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

* Re: [PATCH net-next] xen-netback: use true and false for boolean values
  2018-08-02  0:31 [PATCH net-next] xen-netback: use true and false for boolean values Gustavo A. R. Silva
  2018-08-02  7:55 ` Wei Liu
  2018-08-02  7:55 ` Wei Liu
@ 2018-08-02 21:43 ` David Miller
  2018-08-02 21:43 ` David Miller
  3 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-08-02 21:43 UTC (permalink / raw)
  To: gustavo; +Cc: xen-devel, paul.durrant, wei.liu2, linux-kernel, netdev

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
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 <gustavo@embeddedor.com>

Applied.

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

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

* Re: [PATCH net-next] xen-netback: use true and false for boolean values
  2018-08-02  0:31 [PATCH net-next] xen-netback: use true and false for boolean values Gustavo A. R. Silva
                   ` (2 preceding siblings ...)
  2018-08-02 21:43 ` David Miller
@ 2018-08-02 21:43 ` David Miller
  3 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2018-08-02 21:43 UTC (permalink / raw)
  To: gustavo; +Cc: wei.liu2, paul.durrant, xen-devel, netdev, linux-kernel

From: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
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 <gustavo@embeddedor.com>

Applied.

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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-02  0:31 [PATCH net-next] xen-netback: use true and false for boolean values Gustavo A. R. Silva
2018-08-02  7:55 ` Wei Liu
2018-08-02  7:55 ` Wei Liu
2018-08-02 21:43 ` David Miller
2018-08-02 21:43 ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2018-08-02  0:31 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.