From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sat, 4 Aug 2018 19:08:59 -0500 From: "Gustavo A. R. Silva" To: Konrad Rzeszutek Wilk , Roger Pau =?iso-8859-1?Q?Monn=E9?= , Boris Ostrovsky , Juergen Gross , Jens Axboe Cc: xen-devel@lists.xenproject.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] xen-blkfront: use true and false for boolean values Message-ID: <20180805000859.GA20132@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-ID: 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 --- 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