Skip to contentSkip to conversation

blk-mq: remove blk_mq_alloc_tag_set_tags

PATCH In review Christoph Hellwig 3 participants 5 messages Nov 7, 2022 – Nov 8, 2022 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 blk-mq: remove blk_mq_alloc_tag_set_tags

This is a trivial wrapper with a single caller, so remove it.

---
 block/blk-mq.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
block/blk-mq.c +1 -7
index 7ff3415c8eadc..d26238f0de323 100644
@@ -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;
 
Signature · 1 line
2.30.2
maintainer
#2 lore raw
In reply to Christoph Hellwig
Quoted 1 line · Christoph Hellwig

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.

Signature · 1 line
Jens Axboe
#3 lore raw
Quoted 3 lines · Jens Axboe

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.

maintainer
#4 lore raw
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Jens Axboe

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.

Signature · 1 line
Jens Axboe