Commit cae740a0 authored by John Garry's avatar John Garry Committed by Jens Axboe

blk-mq: Remove some unused function arguments

The struct blk_mq_hw_ctx pointer argument in blk_mq_put_tag(),
blk_mq_poll_nsecs(), and blk_mq_poll_hybrid_sleep() is unused, so remove
it.

Overall obj code size shows a minor reduction, before:
   text	   data	    bss	    dec	    hex	filename
  27306	   1312	      0	  28618	   6fca	block/blk-mq.o
   4303	    272	      0	   4575	   11df	block/blk-mq-tag.o

after:
  27282	   1312	      0	  28594	   6fb2	block/blk-mq.o
   4311	    272	      0	   4583	   11e7	block/blk-mq-tag.o
Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarJohn Garry <john.garry@huawei.com>
--
This minor patch had been carried as part of the blk-mq shared tags RFC,
I'd rather not carry it anymore as it required rebasing, so now or never..
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 93d7c318
...@@ -183,8 +183,8 @@ unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data) ...@@ -183,8 +183,8 @@ unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data)
return tag + tag_offset; return tag + tag_offset;
} }
void blk_mq_put_tag(struct blk_mq_hw_ctx *hctx, struct blk_mq_tags *tags, void blk_mq_put_tag(struct blk_mq_tags *tags, struct blk_mq_ctx *ctx,
struct blk_mq_ctx *ctx, unsigned int tag) unsigned int tag)
{ {
if (!blk_mq_tag_is_reserved(tags, tag)) { if (!blk_mq_tag_is_reserved(tags, tag)) {
const int real_tag = tag - tags->nr_reserved_tags; const int real_tag = tag - tags->nr_reserved_tags;
......
...@@ -26,8 +26,8 @@ extern struct blk_mq_tags *blk_mq_init_tags(unsigned int nr_tags, unsigned int r ...@@ -26,8 +26,8 @@ extern struct blk_mq_tags *blk_mq_init_tags(unsigned int nr_tags, unsigned int r
extern void blk_mq_free_tags(struct blk_mq_tags *tags); extern void blk_mq_free_tags(struct blk_mq_tags *tags);
extern unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data); extern unsigned int blk_mq_get_tag(struct blk_mq_alloc_data *data);
extern void blk_mq_put_tag(struct blk_mq_hw_ctx *hctx, struct blk_mq_tags *tags, extern void blk_mq_put_tag(struct blk_mq_tags *tags, struct blk_mq_ctx *ctx,
struct blk_mq_ctx *ctx, unsigned int tag); unsigned int tag);
extern int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx, extern int blk_mq_tag_update_depth(struct blk_mq_hw_ctx *hctx,
struct blk_mq_tags **tags, struct blk_mq_tags **tags,
unsigned int depth, bool can_grow); unsigned int depth, bool can_grow);
......
...@@ -477,9 +477,9 @@ static void __blk_mq_free_request(struct request *rq) ...@@ -477,9 +477,9 @@ static void __blk_mq_free_request(struct request *rq)
blk_pm_mark_last_busy(rq); blk_pm_mark_last_busy(rq);
rq->mq_hctx = NULL; rq->mq_hctx = NULL;
if (rq->tag != -1) if (rq->tag != -1)
blk_mq_put_tag(hctx, hctx->tags, ctx, rq->tag); blk_mq_put_tag(hctx->tags, ctx, rq->tag);
if (sched_tag != -1) if (sched_tag != -1)
blk_mq_put_tag(hctx, hctx->sched_tags, ctx, sched_tag); blk_mq_put_tag(hctx->sched_tags, ctx, sched_tag);
blk_mq_sched_restart(hctx); blk_mq_sched_restart(hctx);
blk_queue_exit(q); blk_queue_exit(q);
} }
...@@ -3402,7 +3402,6 @@ static void blk_mq_poll_stats_fn(struct blk_stat_callback *cb) ...@@ -3402,7 +3402,6 @@ static void blk_mq_poll_stats_fn(struct blk_stat_callback *cb)
} }
static unsigned long blk_mq_poll_nsecs(struct request_queue *q, static unsigned long blk_mq_poll_nsecs(struct request_queue *q,
struct blk_mq_hw_ctx *hctx,
struct request *rq) struct request *rq)
{ {
unsigned long ret = 0; unsigned long ret = 0;
...@@ -3435,7 +3434,6 @@ static unsigned long blk_mq_poll_nsecs(struct request_queue *q, ...@@ -3435,7 +3434,6 @@ static unsigned long blk_mq_poll_nsecs(struct request_queue *q,
} }
static bool blk_mq_poll_hybrid_sleep(struct request_queue *q, static bool blk_mq_poll_hybrid_sleep(struct request_queue *q,
struct blk_mq_hw_ctx *hctx,
struct request *rq) struct request *rq)
{ {
struct hrtimer_sleeper hs; struct hrtimer_sleeper hs;
...@@ -3455,7 +3453,7 @@ static bool blk_mq_poll_hybrid_sleep(struct request_queue *q, ...@@ -3455,7 +3453,7 @@ static bool blk_mq_poll_hybrid_sleep(struct request_queue *q,
if (q->poll_nsec > 0) if (q->poll_nsec > 0)
nsecs = q->poll_nsec; nsecs = q->poll_nsec;
else else
nsecs = blk_mq_poll_nsecs(q, hctx, rq); nsecs = blk_mq_poll_nsecs(q, rq);
if (!nsecs) if (!nsecs)
return false; return false;
...@@ -3510,7 +3508,7 @@ static bool blk_mq_poll_hybrid(struct request_queue *q, ...@@ -3510,7 +3508,7 @@ static bool blk_mq_poll_hybrid(struct request_queue *q,
return false; return false;
} }
return blk_mq_poll_hybrid_sleep(q, hctx, rq); return blk_mq_poll_hybrid_sleep(q, rq);
} }
/** /**
......
...@@ -200,7 +200,7 @@ static inline bool blk_mq_get_dispatch_budget(struct blk_mq_hw_ctx *hctx) ...@@ -200,7 +200,7 @@ static inline bool blk_mq_get_dispatch_budget(struct blk_mq_hw_ctx *hctx)
static inline void __blk_mq_put_driver_tag(struct blk_mq_hw_ctx *hctx, static inline void __blk_mq_put_driver_tag(struct blk_mq_hw_ctx *hctx,
struct request *rq) struct request *rq)
{ {
blk_mq_put_tag(hctx, hctx->tags, rq->mq_ctx, rq->tag); blk_mq_put_tag(hctx->tags, rq->mq_ctx, rq->tag);
rq->tag = -1; rq->tag = -1;
if (rq->rq_flags & RQF_MQ_INFLIGHT) { if (rq->rq_flags & RQF_MQ_INFLIGHT) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment