Message ID | 20221107061706.1269999-1-hch@lst.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | blk-mq: remove blk_mq_alloc_tag_set_tags | expand |
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
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.
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.
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.
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;
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(-)