[PATCH] block: fix boolconv.cocci warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux