Linux block layer
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Bart Van Assche <bvanassche@acm.org>,
	Damien Le Moal <dlemoal@kernel.org>
Subject: [PATCH 1/3] mq-deadline: Remove a local variable
Date: Thu, 12 Dec 2024 13:29:39 -0800	[thread overview]
Message-ID: <20241212212941.1268662-2-bvanassche@acm.org> (raw)
In-Reply-To: <20241212212941.1268662-1-bvanassche@acm.org>

Since commit fde02699c242 ("block: mq-deadline: Remove support for zone
write locking"), the local variable 'insert_before' is assigned once and
is used once. Hence remove this local variable.

Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 block/mq-deadline.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index 91b3789f710e..5528347b5fcf 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -698,8 +698,6 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
 		list_add(&rq->queuelist, &per_prio->dispatch);
 		rq->fifo_time = jiffies;
 	} else {
-		struct list_head *insert_before;
-
 		deadline_add_rq_rb(per_prio, rq);
 
 		if (rq_mergeable(rq)) {
@@ -712,8 +710,7 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
 		 * set expire time and add to fifo list
 		 */
 		rq->fifo_time = jiffies + dd->fifo_expire[data_dir];
-		insert_before = &per_prio->fifo_list[data_dir];
-		list_add_tail(&rq->queuelist, insert_before);
+		list_add_tail(&rq->queuelist, &per_prio->fifo_list[data_dir]);
 	}
 }
 

  reply	other threads:[~2024-12-12 21:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-12 21:29 [PATCH 0/3] Three small block layer patches Bart Van Assche
2024-12-12 21:29 ` Bart Van Assche [this message]
2024-12-13  4:44   ` [PATCH 1/3] mq-deadline: Remove a local variable Christoph Hellwig
2024-12-13  5:36   ` Nitesh Shetty
2024-12-13  7:26   ` Johannes Thumshirn
2024-12-12 21:29 ` [PATCH 2/3] blk-mq: Clean up blk_mq_requeue_work() Bart Van Assche
2024-12-13  4:44   ` Christoph Hellwig
2024-12-13  5:34   ` Nitesh Shetty
2024-12-13  7:26   ` Johannes Thumshirn
2024-12-12 21:29 ` [PATCH 3/3] block: Fix queue_iostats_passthrough_show() Bart Van Assche
2024-12-13  4:46   ` Christoph Hellwig
2024-12-13 16:26     ` Bart Van Assche
2024-12-16 15:56       ` Christoph Hellwig
2024-12-13 15:09 ` [PATCH 0/3] Three small block layer patches Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241212212941.1268662-2-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox