[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250328031321.790317-1-mengfanhui@kylinos.cn>
Date: Fri, 28 Mar 2025 11:13:21 +0800
From: Fanhui Meng <mengfanhui@...inos.cn>
To: axboe@...nel.dk
Cc: linux-block@...r.kernel.org,
linux-kernel@...r.kernel.org,
mengfanhui@...inos.cn
Subject: [PATCH] block: optimize sq_hctx assignment
Optimizing code for greater standardization.
Signed-off-by: Fanhui Meng <mengfanhui@...inos.cn>
---
block/blk-mq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/block/blk-mq.c b/block/blk-mq.c
index 40490ac88045..182557019832 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -2384,10 +2384,9 @@ static struct blk_mq_hw_ctx *blk_mq_get_sq_hctx(struct request_queue *q)
*/
void blk_mq_run_hw_queues(struct request_queue *q, bool async)
{
- struct blk_mq_hw_ctx *hctx, *sq_hctx;
+ struct blk_mq_hw_ctx *hctx, *sq_hctx = NULL;
unsigned long i;
- sq_hctx = NULL;
if (blk_queue_sq_sched(q))
sq_hctx = blk_mq_get_sq_hctx(q);
queue_for_each_hw_ctx(q, hctx, i) {
--
2.25.1
Powered by blists - more mailing lists