Thread (21 messages) 21 messages, 3 authors, 2020-08-18
STALE2135d

[PATCH] block: fix boolconv.cocci warnings

From: kernel test robot <hidden>
Date: 2020-08-17 07:56:41
Also in: lkml, oe-kbuild-all

From: kernel test robot <redacted>

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@linux.alibaba.com>
Signed-off-by: kernel test robot <redacted>
---

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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help