* [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é
2018-08-06 14:15 ` Jens Axboe
0 siblings, 2 replies; 3+ 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] 3+ messages in thread
* Re: [PATCH] xen-blkfront: use true and false for boolean values
2018-08-05 0:08 [PATCH] xen-blkfront: use true and false for boolean values Gustavo A. R. Silva
@ 2018-08-06 9:17 ` Roger Pau Monné
2018-08-06 14:15 ` Jens Axboe
1 sibling, 0 replies; 3+ 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] 3+ messages in thread
* Re: [PATCH] xen-blkfront: use true and false for boolean values
2018-08-05 0:08 [PATCH] xen-blkfront: use true and false for boolean values Gustavo A. R. Silva
2018-08-06 9:17 ` Roger Pau Monné
@ 2018-08-06 14:15 ` Jens Axboe
1 sibling, 0 replies; 3+ 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] 3+ messages in thread
end of thread, other threads:[~2018-08-06 14:15 UTC | newest]
Thread overview: 3+ 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-06 9:17 ` Roger Pau Monné
2018-08-06 14:15 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).