summaryrefslogtreecommitdiff
path: root/block/blk-merge.c
diff options
context:
space:
mode:
authorBaolin Wang <baolin.wang@linux.alibaba.com>2020-09-02 04:45:25 +0300
committerJens Axboe <axboe@kernel.dk>2020-09-02 04:48:06 +0300
commit265600b7b6e88f3cc4cef2774afe0eb4abe72d72 (patch)
tree75654937e6130a4deb47548e054634abee64dc9e /block/blk-merge.c
parent8327cce5ff9376fac9ff713a8d5c99c16ba3fa33 (diff)
downloadlinux-265600b7b6e88f3cc4cef2774afe0eb4abe72d72.tar.xz
block: Remove a duplicative condition
Remove a duplicative condition to remove below cppcheck warnings: "warning: Redundant condition: sched_allow_merge. '!A || (A && B)' is equivalent to '!A || B' [redundantCondition]" Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r--block/blk-merge.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c
index 80c974484a3f..6ed715835d45 100644
--- a/block/blk-merge.c
+++ b/block/blk-merge.c
@@ -996,13 +996,11 @@ static enum bio_merge_status blk_attempt_bio_merge(struct request_queue *q,
switch (blk_try_merge(rq, bio)) {
case ELEVATOR_BACK_MERGE:
- if (!sched_allow_merge ||
- (sched_allow_merge && blk_mq_sched_allow_merge(q, rq, bio)))
+ if (!sched_allow_merge || blk_mq_sched_allow_merge(q, rq, bio))
return bio_attempt_back_merge(rq, bio, nr_segs);
break;
case ELEVATOR_FRONT_MERGE:
- if (!sched_allow_merge ||
- (sched_allow_merge && blk_mq_sched_allow_merge(q, rq, bio)))
+ if (!sched_allow_merge || blk_mq_sched_allow_merge(q, rq, bio))
return bio_attempt_front_merge(rq, bio, nr_segs);
break;
case ELEVATOR_DISCARD_MERGE: