Change some functions' return type to bool from int because their checking results could represnt in bool value. Signed-off-by: Chengguang Xu <cgxu519@xxxxxxx> --- block/cfq-iosched.c | 4 ++-- block/elevator.c | 2 +- include/linux/elevator.h | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index ed41aa978c4a..b58969b8b6ea 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c @@ -2582,7 +2582,7 @@ cfq_merged_requests(struct request_queue *q, struct request *rq, cfq_del_cfqq_rr(cfqd, cfqq); } -static int cfq_allow_bio_merge(struct request_queue *q, struct request *rq, +static bool cfq_allow_bio_merge(struct request_queue *q, struct request *rq, struct bio *bio) { struct cfq_data *cfqd = q->elevator->elevator_data; @@ -2608,7 +2608,7 @@ static int cfq_allow_bio_merge(struct request_queue *q, struct request *rq, return cfqq == RQ_CFQQ(rq); } -static int cfq_allow_rq_merge(struct request_queue *q, struct request *rq, +static bool cfq_allow_rq_merge(struct request_queue *q, struct request *rq, struct request *next) { return RQ_CFQQ(rq) == RQ_CFQQ(next); diff --git a/block/elevator.c b/block/elevator.c index 8fdcd64ae12e..432717fc782f 100644 --- a/block/elevator.c +++ b/block/elevator.c @@ -56,7 +56,7 @@ static LIST_HEAD(elv_list); * Query io scheduler to see if the current process issuing bio may be * merged with rq. */ -static int elv_iosched_allow_bio_merge(struct request *rq, struct bio *bio) +static bool elv_iosched_allow_bio_merge(struct request *rq, struct bio *bio) { struct request_queue *q = rq->q; struct elevator_queue *e = q->elevator; diff --git a/include/linux/elevator.h b/include/linux/elevator.h index 015bb59c0331..f6928aa5cc3d 100644 --- a/include/linux/elevator.h +++ b/include/linux/elevator.h @@ -30,10 +30,10 @@ typedef void (elevator_merge_req_fn) (struct request_queue *, struct request *, typedef void (elevator_merged_fn) (struct request_queue *, struct request *, enum elv_merge); -typedef int (elevator_allow_bio_merge_fn) (struct request_queue *, +typedef bool (elevator_allow_bio_merge_fn) (struct request_queue *, struct request *, struct bio *); -typedef int (elevator_allow_rq_merge_fn) (struct request_queue *, +typedef bool (elevator_allow_rq_merge_fn) (struct request_queue *, struct request *, struct request *); typedef void (elevator_bio_merged_fn) (struct request_queue *, -- 2.19.2