linux-block.vger.kernel.org archive mirror
 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>, Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/3] blk-iocost: Simplify ioc_rqos_done()
Date: Tue, 14 Jun 2022 10:57:23 -0700	[thread overview]
Message-ID: <20220614175725.612878-2-bvanassche@acm.org> (raw)
In-Reply-To: <20220614175725.612878-1-bvanassche@acm.org>

Leave out the superfluous "& REQ_OP_MASK" code. The definition of req_op()
shows that that code is superfluous:

 #define req_op(req) ((req)->cmd_flags & REQ_OP_MASK)

Compile-tested only.

Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
 block/blk-iocost.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-iocost.c b/block/blk-iocost.c
index 33a11ba971ea..b7082f2aed9c 100644
--- a/block/blk-iocost.c
+++ b/block/blk-iocost.c
@@ -2769,7 +2769,7 @@ static void ioc_rqos_done(struct rq_qos *rqos, struct request *rq)
 	if (!ioc->enabled || !rq->alloc_time_ns || !rq->start_time_ns)
 		return;
 
-	switch (req_op(rq) & REQ_OP_MASK) {
+	switch (req_op(rq)) {
 	case REQ_OP_READ:
 		pidx = QOS_RLAT;
 		rw = READ;

  reply	other threads:[~2022-06-14 17:57 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-14 17:57 [PATCH 0/3] Three small block layer patches Bart Van Assche
2022-06-14 17:57 ` Bart Van Assche [this message]
2022-06-14 18:26   ` [PATCH 1/3] blk-iocost: Simplify ioc_rqos_done() Tejun Heo
2022-06-15  5:58   ` Christoph Hellwig
2022-06-14 17:57 ` [PATCH 2/3] block: Rename a blk_mq_map_queue() argument Bart Van Assche
2022-06-15  5:58   ` Christoph Hellwig
2022-06-14 17:57 ` [PATCH 3/3] block: Specify the operation type when calling blk_mq_map_queue() Bart Van Assche
2022-06-14 19:31   ` Jens Axboe
2022-06-15  0:31   ` Ming Lei
2022-06-15  6:08     ` Christoph Hellwig
2022-06-15  6:24       ` Ming Lei
2022-06-17 18:25       ` Bart Van Assche
2022-06-20  7:29         ` Christoph Hellwig

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=20220614175725.612878-2-bvanassche@acm.org \
    --to=bvanassche@acm.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=tj@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;
as well as URLs for NNTP newsgroup(s).