* [PATCH] blk-mq: remove blk_mq_alloc_tag_set_tags
@ 2022-11-07 6:17 Christoph Hellwig
2022-11-08 3:47 ` Chaitanya Kulkarni
2022-11-08 4:20 ` Jens Axboe
0 siblings, 2 replies; 5+ messages in thread
From: Christoph Hellwig @ 2022-11-07 6:17 UTC (permalink / raw)
To: axboe; +Cc: linux-block
This is a trivial wrapper with a single caller, so remove it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-mq.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 7ff3415c8eadc..d26238f0de323 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -4403,12 +4403,6 @@ static int blk_mq_realloc_tag_set_tags(struct blk_mq_tag_set *set,
return 0;
}
-static int blk_mq_alloc_tag_set_tags(struct blk_mq_tag_set *set,
- int new_nr_hw_queues)
-{
- return blk_mq_realloc_tag_set_tags(set, 0, new_nr_hw_queues);
-}
-
/*
* Alloc a tag set to be associated with one or more request queues.
* May fail with EINVAL for various error conditions. May adjust the
@@ -4471,7 +4465,7 @@ int blk_mq_alloc_tag_set(struct blk_mq_tag_set *set)
goto out_free_srcu;
}
- ret = blk_mq_alloc_tag_set_tags(set, set->nr_hw_queues);
+ ret = blk_mq_realloc_tag_set_tags(set, 0, set->nr_hw_queues);
if (ret)
goto out_cleanup_srcu;
--
2.30.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] blk-mq: remove blk_mq_alloc_tag_set_tags
2022-11-07 6:17 [PATCH] blk-mq: remove blk_mq_alloc_tag_set_tags Christoph Hellwig
@ 2022-11-08 3:47 ` Chaitanya Kulkarni
2022-11-08 4:20 ` Jens Axboe
1 sibling, 0 replies; 5+ messages in thread
From: Chaitanya Kulkarni @ 2022-11-08 3:47 UTC (permalink / raw)
To: Christoph Hellwig, axboe@kernel.dk; +Cc: linux-block@vger.kernel.org
On 11/6/22 22:17, Christoph Hellwig wrote:
> This is a trivial wrapper with a single caller, so remove it.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
> block/blk-mq.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
I thought of it when doing blk_mq_init_alloc_tag_set() RFC :).
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
-ck
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] blk-mq: remove blk_mq_alloc_tag_set_tags
2022-11-07 6:17 [PATCH] blk-mq: remove blk_mq_alloc_tag_set_tags Christoph Hellwig
2022-11-08 3:47 ` Chaitanya Kulkarni
@ 2022-11-08 4:20 ` Jens Axboe
2022-11-08 6:20 ` Christoph Hellwig
1 sibling, 1 reply; 5+ messages in thread
From: Jens Axboe @ 2022-11-08 4:20 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-block
On 11/6/22 11:17 PM, Christoph Hellwig wrote:
> This is a trivial wrapper with a single caller, so remove it.
Getting rid of the helper is nice, but the realloc one is badly
named imho. Can we rename that while at it? There are only 1
caller after this anyway.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] blk-mq: remove blk_mq_alloc_tag_set_tags
2022-11-08 4:20 ` Jens Axboe
@ 2022-11-08 6:20 ` Christoph Hellwig
2022-11-08 14:16 ` Jens Axboe
0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2022-11-08 6:20 UTC (permalink / raw)
To: Jens Axboe; +Cc: Christoph Hellwig, linux-block
On Mon, Nov 07, 2022 at 09:20:37PM -0700, Jens Axboe wrote:
> Getting rid of the helper is nice, but the realloc one is badly
> named imho. Can we rename that while at it? There are only 1
> caller after this anyway.
Tell me your preferred name and I'll do it.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] blk-mq: remove blk_mq_alloc_tag_set_tags
2022-11-08 6:20 ` Christoph Hellwig
@ 2022-11-08 14:16 ` Jens Axboe
0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2022-11-08 14:16 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-block
On 11/7/22 11:20 PM, Christoph Hellwig wrote:
> On Mon, Nov 07, 2022 at 09:20:37PM -0700, Jens Axboe wrote:
>> Getting rid of the helper is nice, but the realloc one is badly
>> named imho. Can we rename that while at it? There are only 1
>> caller after this anyway.
>
> Tell me your preferred name and I'll do it.
Just call it blk_mq_alloc_tag_set_tags() at least and get rid of the
realloc? Should make the patch simpler too.
--
Jens Axboe
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-11-08 14:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-07 6:17 [PATCH] blk-mq: remove blk_mq_alloc_tag_set_tags Christoph Hellwig
2022-11-08 3:47 ` Chaitanya Kulkarni
2022-11-08 4:20 ` Jens Axboe
2022-11-08 6:20 ` Christoph Hellwig
2022-11-08 14:16 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).