Skip to content

Commit f87c30c

Browse files
GustavoARSilvaaxboe
authored andcommitted
xen-blkfront: use true and false for boolean values
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. Acked-by: Roger Pau Monné <[email protected]> Signed-off-by: Gustavo A. R. Silva <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent f10fe9d commit f87c30c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/block/xen-blkfront.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ static bool blkif_completion(unsigned long *id,
14361436

14371437
/* Wait the second response if not yet here. */
14381438
if (s2->status == REQ_WAITING)
1439-
return 0;
1439+
return false;
14401440

14411441
bret->status = blkif_get_final_status(s->status,
14421442
s2->status);
@@ -1537,7 +1537,7 @@ static bool blkif_completion(unsigned long *id,
15371537
}
15381538
}
15391539

1540-
return 1;
1540+
return true;
15411541
}
15421542

15431543
static irqreturn_t blkif_interrupt(int irq, void *dev_id)

0 commit comments

Comments
 (0)