Skip to content

Commit 61667cb

Browse files
guixinliu1995axboe
authored andcommitted
block: remove unused parameter
The blk_mq_map_queue()'s request_queue param is not used anymore, remove it, same with blk_get_flush_queue(). Signed-off-by: Guixin Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 7e76336 commit 61667cb

File tree

6 files changed

+10
-13
lines changed

6 files changed

+10
-13
lines changed

block/blk-flush.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ static void blk_kick_flush(struct request_queue *q,
9595
struct blk_flush_queue *fq, blk_opf_t flags);
9696

9797
static inline struct blk_flush_queue *
98-
blk_get_flush_queue(struct request_queue *q, struct blk_mq_ctx *ctx)
98+
blk_get_flush_queue(struct blk_mq_ctx *ctx)
9999
{
100-
return blk_mq_map_queue(q, REQ_OP_FLUSH, ctx)->fq;
100+
return blk_mq_map_queue(REQ_OP_FLUSH, ctx)->fq;
101101
}
102102

103103
static unsigned int blk_flush_cur_seq(struct request *rq)
@@ -205,7 +205,7 @@ static enum rq_end_io_ret flush_end_io(struct request *flush_rq,
205205
struct list_head *running;
206206
struct request *rq, *n;
207207
unsigned long flags = 0;
208-
struct blk_flush_queue *fq = blk_get_flush_queue(q, flush_rq->mq_ctx);
208+
struct blk_flush_queue *fq = blk_get_flush_queue(flush_rq->mq_ctx);
209209

210210
/* release the tag's ownership to the req cloned from */
211211
spin_lock_irqsave(&fq->mq_flush_lock, flags);
@@ -341,7 +341,7 @@ static enum rq_end_io_ret mq_flush_data_end_io(struct request *rq,
341341
struct blk_mq_hw_ctx *hctx = rq->mq_hctx;
342342
struct blk_mq_ctx *ctx = rq->mq_ctx;
343343
unsigned long flags;
344-
struct blk_flush_queue *fq = blk_get_flush_queue(q, ctx);
344+
struct blk_flush_queue *fq = blk_get_flush_queue(ctx);
345345

346346
if (q->elevator) {
347347
WARN_ON(rq->tag < 0);
@@ -382,7 +382,7 @@ static void blk_rq_init_flush(struct request *rq)
382382
bool blk_insert_flush(struct request *rq)
383383
{
384384
struct request_queue *q = rq->q;
385-
struct blk_flush_queue *fq = blk_get_flush_queue(q, rq->mq_ctx);
385+
struct blk_flush_queue *fq = blk_get_flush_queue(rq->mq_ctx);
386386
bool supports_fua = q->limits.features & BLK_FEAT_FUA;
387387
unsigned int policy = 0;
388388

block/blk-mq-sched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ bool blk_mq_sched_bio_merge(struct request_queue *q, struct bio *bio,
349349
}
350350

351351
ctx = blk_mq_get_ctx(q);
352-
hctx = blk_mq_map_queue(q, bio->bi_opf, ctx);
352+
hctx = blk_mq_map_queue(bio->bi_opf, ctx);
353353
type = hctx->type;
354354
if (list_empty_careful(&ctx->rq_lists[type]))
355355
goto out_put;

block/blk-mq-tag.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data)
190190
sbitmap_finish_wait(bt, ws, &wait);
191191

192192
data->ctx = blk_mq_get_ctx(data->q);
193-
data->hctx = blk_mq_map_queue(data->q, data->cmd_flags,
194-
data->ctx);
193+
data->hctx = blk_mq_map_queue(data->cmd_flags, data->ctx);
195194
tags = blk_mq_tags_from_data(data);
196195
if (data->flags & BLK_MQ_REQ_RESERVED)
197196
bt = &tags->breserved_tags;

block/blk-mq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ static struct request *__blk_mq_alloc_requests(struct blk_mq_alloc_data *data)
508508

509509
retry:
510510
data->ctx = blk_mq_get_ctx(q);
511-
data->hctx = blk_mq_map_queue(q, data->cmd_flags, data->ctx);
511+
data->hctx = blk_mq_map_queue(data->cmd_flags, data->ctx);
512512

513513
if (q->elevator) {
514514
/*

block/blk-mq.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,10 @@ static inline enum hctx_type blk_mq_get_hctx_type(blk_opf_t opf)
100100

101101
/*
102102
* blk_mq_map_queue() - map (cmd_flags,type) to hardware queue
103-
* @q: request queue
104103
* @opf: operation type (REQ_OP_*) and flags (e.g. REQ_POLLED).
105104
* @ctx: software queue cpu ctx
106105
*/
107-
static inline struct blk_mq_hw_ctx *blk_mq_map_queue(struct request_queue *q,
108-
blk_opf_t opf,
106+
static inline struct blk_mq_hw_ctx *blk_mq_map_queue(blk_opf_t opf,
109107
struct blk_mq_ctx *ctx)
110108
{
111109
return ctx->hctxs[blk_mq_get_hctx_type(opf)];

block/kyber-iosched.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ static bool kyber_bio_merge(struct request_queue *q, struct bio *bio,
568568
unsigned int nr_segs)
569569
{
570570
struct blk_mq_ctx *ctx = blk_mq_get_ctx(q);
571-
struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, bio->bi_opf, ctx);
571+
struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(bio->bi_opf, ctx);
572572
struct kyber_hctx_data *khd = hctx->sched_data;
573573
struct kyber_ctx_queue *kcq = &khd->kcqs[ctx->index_hw[hctx->type]];
574574
unsigned int sched_domain = kyber_sched_domain(bio->bi_opf);

0 commit comments

Comments
 (0)