All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xen-blkfront: use true and false for boolean values
@ 2018-08-05  0:08 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-05  0:08 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Roger Pau Monné, Boris Ostrovsky,
	Juergen Gross, Jens Axboe
  Cc: xen-devel, linux-block, 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/block/xen-blkfront.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 94300db..8986ada 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1436,7 +1436,7 @@ static bool blkif_completion(unsigned long *id,
 
 		/* Wait the second response if not yet here. */
 		if (s2->status == REQ_WAITING)
-			return 0;
+			return false;
 
 		bret->status = blkif_get_final_status(s->status,
 						      s2->status);
@@ -1537,7 +1537,7 @@ static bool blkif_completion(unsigned long *id,
 		}
 	}
 
-	return 1;
+	return true;
 }
 
 static irqreturn_t blkif_interrupt(int irq, void *dev_id)
-- 
2.7.4

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

* [PATCH] xen-blkfront: use true and false for boolean values
@ 2018-08-05  0:08 ` Gustavo A. R. Silva
  0 siblings, 0 replies; 7+ messages in thread
From: Gustavo A. R. Silva @ 2018-08-05  0:08 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Roger Pau Monné, Boris Ostrovsky,
	Juergen Gross, Jens Axboe
  Cc: linux-block, 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/block/xen-blkfront.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c
index 94300db..8986ada 100644
--- a/drivers/block/xen-blkfront.c
+++ b/drivers/block/xen-blkfront.c
@@ -1436,7 +1436,7 @@ static bool blkif_completion(unsigned long *id,
 
 		/* Wait the second response if not yet here. */
 		if (s2->status == REQ_WAITING)
-			return 0;
+			return false;
 
 		bret->status = blkif_get_final_status(s->status,
 						      s2->status);
@@ -1537,7 +1537,7 @@ static bool blkif_completion(unsigned long *id,
 		}
 	}
 
-	return 1;
+	return true;
 }
 
 static irqreturn_t blkif_interrupt(int irq, void *dev_id)
-- 
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] 7+ messages in thread

* Re: [PATCH] xen-blkfront: use true and false for boolean values
  2018-08-05  0:08 ` Gustavo A. R. Silva
@ 2018-08-06  9:17   ` Roger Pau Monné
  -1 siblings, 0 replies; 7+ messages in thread
From: Roger Pau Monné @ 2018-08-06  9:17 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Konrad Rzeszutek Wilk, Boris Ostrovsky, Juergen Gross, Jens Axboe,
	xen-devel, linux-block, linux-kernel

On Sat, Aug 04, 2018 at 07:08:59PM -0500, Gustavo A. R. Silva wrote:
> 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>

Acked-by: Roger Pau Monn� <roger.pau@citrix.com>

Thanks, Roger.

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

* Re: [PATCH] xen-blkfront: use true and false for boolean values
  2018-08-05  0:08 ` Gustavo A. R. Silva
  (?)
  (?)
@ 2018-08-06  9:17 ` Roger Pau Monné
  -1 siblings, 0 replies; 7+ messages in thread
From: Roger Pau Monné @ 2018-08-06  9:17 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Juergen Gross, Jens Axboe, linux-kernel, linux-block, xen-devel,
	Boris Ostrovsky

On Sat, Aug 04, 2018 at 07:08:59PM -0500, Gustavo A. R. Silva wrote:
> 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>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.

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

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

* Re: [PATCH] xen-blkfront: use true and false for boolean values
@ 2018-08-06  9:17   ` Roger Pau Monné
  0 siblings, 0 replies; 7+ messages in thread
From: Roger Pau Monné @ 2018-08-06  9:17 UTC (permalink / raw)
  To: Gustavo A. R. Silva
  Cc: Konrad Rzeszutek Wilk, Boris Ostrovsky, Juergen Gross, Jens Axboe,
	xen-devel, linux-block, linux-kernel

On Sat, Aug 04, 2018 at 07:08:59PM -0500, Gustavo A. R. Silva wrote:
> 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>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.

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

* Re: [PATCH] xen-blkfront: use true and false for boolean values
  2018-08-05  0:08 ` Gustavo A. R. Silva
                   ` (2 preceding siblings ...)
  (?)
@ 2018-08-06 14:15 ` Jens Axboe
  -1 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2018-08-06 14:15 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Konrad Rzeszutek Wilk, Roger Pau Monné,
	Boris Ostrovsky, Juergen Gross
  Cc: xen-devel, linux-block, linux-kernel

On 8/4/18 6:08 PM, Gustavo A. R. Silva wrote:
> 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.

Applied, thanks.

-- 
Jens Axboe

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

* Re: [PATCH] xen-blkfront: use true and false for boolean values
  2018-08-05  0:08 ` Gustavo A. R. Silva
                   ` (3 preceding siblings ...)
  (?)
@ 2018-08-06 14:15 ` Jens Axboe
  -1 siblings, 0 replies; 7+ messages in thread
From: Jens Axboe @ 2018-08-06 14:15 UTC (permalink / raw)
  To: Gustavo A. R. Silva, Konrad Rzeszutek Wilk, Roger Pau Monné,
	Boris Ostrovsky, Juergen Gross
  Cc: linux-block, xen-devel, linux-kernel

On 8/4/18 6:08 PM, Gustavo A. R. Silva wrote:
> 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.

Applied, thanks.

-- 
Jens Axboe


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

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-05  0:08 [PATCH] xen-blkfront: use true and false for boolean values Gustavo A. R. Silva
2018-08-05  0:08 ` Gustavo A. R. Silva
2018-08-06  9:17 ` Roger Pau Monné
2018-08-06  9:17   ` Roger Pau Monné
2018-08-06  9:17 ` Roger Pau Monné
2018-08-06 14:15 ` Jens Axboe
2018-08-06 14:15 ` Jens Axboe

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.