path: root/block/elevator.c
diff options
authorBart Van Assche <>2017-02-01 12:22:23 -0700
committerJens Axboe <>2017-02-01 12:22:23 -0700
commita1ae0f74a73fbd113647321c49032a561b3f3781 (patch)
tree8b15485d541590ccc66841a9d807e4f244243576 /block/elevator.c
parentf3bcb0e60685acfc258a20caa0607e084271c482 (diff)
blk-mq-debug: Avoid that sparse complains about req_flags_t usage
Avoid that sparse reports the following complaints: block/elevator.c:541:29: warning: incorrect type in assignment (different base types) block/elevator.c:541:29: expected bool [unsigned] [usertype] next_sorted block/elevator.c:541:29: got restricted req_flags_t block/blk-mq-debugfs.c:92:54: warning: cast from restricted req_flags_t Signed-off-by: Bart Van Assche <> Reviewed-by: Omar Sandoval <> Signed-off-by: Jens Axboe <>
Diffstat (limited to 'block/elevator.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/block/elevator.c b/block/elevator.c
index dba9be8..7e4f588 100644
--- a/block/elevator.c
+++ b/block/elevator.c
@@ -538,7 +538,7 @@ void elv_merge_requests(struct request_queue *q, struct request *rq,
if (e->uses_mq && e->type->
e->type->, rq, next);
else if (e->type->ops.sq.elevator_merge_req_fn) {
- next_sorted = next->rq_flags & RQF_SORTED;
+ next_sorted = (__force bool)(next->rq_flags & RQF_SORTED);
if (next_sorted)
e->type->ops.sq.elevator_merge_req_fn(q, rq, next);