[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3bdc9526ac839a6952db8cd50cf0e75280614b1d.1606186717.git.baolin.wang@linux.alibaba.com>
Date: Tue, 24 Nov 2020 11:33:32 +0800
From: Baolin Wang <baolin.wang@...ux.alibaba.com>
To: axboe@...nel.dk, tj@...nel.org
Cc: baolin.wang@...ux.alibaba.com, baolin.wang7@...il.com,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/7] blk-iocost: Just open code the q_name()
The simple q_name() function is only called from ioc_name(),
just open code it to make code more readable.
Signed-off-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
---
block/blk-iocost.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 103ccbd..089f3fe 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -665,17 +665,14 @@ static struct ioc *q_to_ioc(struct request_queue *q)
return rqos_to_ioc(rq_qos_id(q, RQ_QOS_COST));
}
-static const char *q_name(struct request_queue *q)
+static const char __maybe_unused *ioc_name(struct ioc *ioc)
{
+ struct request_queue *q = ioc->rqos.q;
+
if (blk_queue_registered(q))
return kobject_name(q->kobj.parent);
- else
- return "<unknown>";
-}
-static const char __maybe_unused *ioc_name(struct ioc *ioc)
-{
- return q_name(ioc->rqos.q);
+ return "<unknown>";
}
static struct ioc_gq *pd_to_iocg(struct blkg_policy_data *pd)
--
1.8.3.1
Powered by blists - more mailing lists