linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blk-mq: remove unused param in bt_alloc()
@ 2015-04-06  9:36 nimisolo
  2015-04-06 15:56 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: nimisolo @ 2015-04-06  9:36 UTC (permalink / raw)
  To: axboe; +Cc: linux-kernel, nimisolo

In bt_alloc(), the param is unused, maybe we can remove it.

Signed-off-by: nimisolo <nimisolo@aliyun.com>
---
 block/blk-mq-tag.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index be3290c..b7ac73a 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -486,7 +486,7 @@ static void bt_update_count(struct blk_mq_bitmap_tags *bt,
 }
 
 static int bt_alloc(struct blk_mq_bitmap_tags *bt, unsigned int depth,
-			int node, bool reserved)
+			int node)
 {
 	int i;
 
@@ -553,9 +553,9 @@ static struct blk_mq_tags *blk_mq_init_bitmap_tags(struct blk_mq_tags *tags,
 
 	tags->alloc_policy = alloc_policy;
 
-	if (bt_alloc(&tags->bitmap_tags, depth, node, false))
+	if (bt_alloc(&tags->bitmap_tags, depth, node))
 		goto enomem;
-	if (bt_alloc(&tags->breserved_tags, tags->nr_reserved_tags, node, true))
+	if (bt_alloc(&tags->breserved_tags, tags->nr_reserved_tags, node))
 		goto enomem;
 
 	return tags;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] blk-mq: remove unused param in bt_alloc()
  2015-04-06  9:36 [PATCH] blk-mq: remove unused param in bt_alloc() nimisolo
@ 2015-04-06 15:56 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2015-04-06 15:56 UTC (permalink / raw)
  To: nimisolo; +Cc: linux-kernel

On 04/06/2015 03:36 AM, nimisolo wrote:
> In bt_alloc(), the param is unused, maybe we can remove it.

Should probably turn that into WARN() condition instead, of depth == 0 
and !reserved.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-04-06 15:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-06  9:36 [PATCH] blk-mq: remove unused param in bt_alloc() nimisolo
2015-04-06 15:56 ` 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).