[PATCH] block: fix boolconv.cocci warnings

From: kernel test robot
Date: Mon Aug 17 2020 - 03:56:40 EST


From: kernel test robot <lkp@xxxxxxxxx>

block/blk-mq-sched.c:404:39-44: WARNING: conversion to bool not needed here

Remove unneeded conversion to bool

Semantic patch information:
Relational and logical operators evaluate to bool,
explicit conversion is overly verbose and unneeded.

Generated by: scripts/coccinelle/misc/boolconv.cocci

CC: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx>
Signed-off-by: kernel test robot <lkp@xxxxxxxxx>
---

url: https://github.com/0day-ci/linux/commits/Baolin-Wang/Some-clean-ups-for-bio-merge/20200817-121114
base: https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git for-next

Please take the patch only if it's a positive warning. Thanks!

blk-mq-sched.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -401,7 +401,7 @@ bool blk_mq_bio_list_merge(struct reques
if (merge == BIO_MERGE_NONE)
continue;

- return merge == BIO_MERGE_OK ? true: false;
+ return merge == BIO_MERGE_OK;
}

return false;