Skip to contentSkip to conversation

xen-blkfront: use true and false for boolean values

PATCH Applied Gustavo A. R. Silva 3 participants 5 messages Aug 5, 2018 – Aug 6, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/block/xen-blkfront.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/block/xen-blkfront.c +2 -2
index 94300db..8986ada 100644
@@ -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)
Signature · 1 line
2.7.4
Acked-by on v1 1/1
#2 lore raw
In reply to Gustavo A. R. Silva
Quoted 6 lines · 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.

Thanks, Roger.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

maintainer Applied
#3 lore raw
In reply to Gustavo A. R. Silva
Quoted 4 lines · 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.

Applied, thanks.

Signature · 1 line
Jens Axboe
maintainer Applied
#4 lore raw
In reply to Gustavo A. R. Silva
Quoted 4 lines · 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.

Applied, thanks.

Signature · 7 lines
Jens Axboe


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel