Inside blk_mq_alloc_rqs(), 'max_order' is actually one const local variable, define it as macro, and this macro will be re-used in following patch. Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx> Cc: Hannes Reinecke <hare@xxxxxxx> Cc: Bart Van Assche <bvanassche@xxxxxxx> Cc: John Garry <john.garry@xxxxxxxxxx> Cc: Christoph Hellwig <hch@xxxxxx> --- block/blk-mq.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 77d885805699..f9da2d803c18 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -2360,10 +2360,12 @@ static int blk_mq_init_request(struct blk_mq_tag_set *set, struct request *rq, return 0; } +#define MAX_RQS_PAGE_ORDER 4 + int blk_mq_alloc_rqs(struct blk_mq_tag_set *set, struct blk_mq_tags *tags, unsigned int hctx_idx, unsigned int depth) { - unsigned int i, j, entries_per_page, max_order = 4; + unsigned int i, j, entries_per_page; size_t rq_size, left; int node; @@ -2382,7 +2384,7 @@ int blk_mq_alloc_rqs(struct blk_mq_tag_set *set, struct blk_mq_tags *tags, left = rq_size * depth; for (i = 0; i < depth; ) { - int this_order = max_order; + int this_order = MAX_RQS_PAGE_ORDER; struct page *page; int to_do; void *p; -- 2.25.2