linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] block: use req_op() to maintain consistency
@ 2019-06-13 14:14 Chaitanya Kulkarni
  2019-06-13 16:54 ` Martin K. Petersen
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2019-06-13 14:14 UTC (permalink / raw)
  To: linux-block; +Cc: Chaitanya Kulkarni

This is a pure code cleanup patch and doesn't change any functionality.
In block layer to identify the request operation req_op() macro is
used, so change the open coding the req_op() in the blk-mq-debugfs.c.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 block/blk-mq-debugfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 6aea0ebc3a73..c6c3c4f4128a 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -341,7 +341,7 @@ static const char *blk_mq_rq_state_name(enum mq_rq_state rq_state)
 int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq)
 {
 	const struct blk_mq_ops *const mq_ops = rq->q->mq_ops;
-	const unsigned int op = rq->cmd_flags & REQ_OP_MASK;
+	const unsigned int op = req_op(rq);
 
 	seq_printf(m, "%p {.op=", rq);
 	if (op < ARRAY_SIZE(op_name) && op_name[op])
-- 
2.19.1


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

* Re: [PATCH] block: use req_op() to maintain consistency
  2019-06-13 14:14 [PATCH] block: use req_op() to maintain consistency Chaitanya Kulkarni
@ 2019-06-13 16:54 ` Martin K. Petersen
  2019-06-17  8:41 ` Hannes Reinecke
  2019-06-17 15:34 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2019-06-13 16:54 UTC (permalink / raw)
  To: Chaitanya Kulkarni; +Cc: linux-block


Chaitanya,

> This is a pure code cleanup patch and doesn't change any functionality.
> In block layer to identify the request operation req_op() macro is
> used, so change the open coding the req_op() in the blk-mq-debugfs.c.

Looks good.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

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

* Re: [PATCH] block: use req_op() to maintain consistency
  2019-06-13 14:14 [PATCH] block: use req_op() to maintain consistency Chaitanya Kulkarni
  2019-06-13 16:54 ` Martin K. Petersen
@ 2019-06-17  8:41 ` Hannes Reinecke
  2019-06-17 15:34 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2019-06-17  8:41 UTC (permalink / raw)
  To: Chaitanya Kulkarni, linux-block

On 6/13/19 4:14 PM, Chaitanya Kulkarni wrote:
> This is a pure code cleanup patch and doesn't change any functionality.
> In block layer to identify the request operation req_op() macro is
> used, so change the open coding the req_op() in the blk-mq-debugfs.c.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> ---
>  block/blk-mq-debugfs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
> index 6aea0ebc3a73..c6c3c4f4128a 100644
> --- a/block/blk-mq-debugfs.c
> +++ b/block/blk-mq-debugfs.c
> @@ -341,7 +341,7 @@ static const char *blk_mq_rq_state_name(enum mq_rq_state rq_state)
>  int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq)
>  {
>  	const struct blk_mq_ops *const mq_ops = rq->q->mq_ops;
> -	const unsigned int op = rq->cmd_flags & REQ_OP_MASK;
> +	const unsigned int op = req_op(rq);
>  
>  	seq_printf(m, "%p {.op=", rq);
>  	if (op < ARRAY_SIZE(op_name) && op_name[op])
> 
Reviewed-by: Hannes Reinecke <hare@suse.com>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		   Teamlead Storage & Networking
hare@suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)

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

* Re: [PATCH] block: use req_op() to maintain consistency
  2019-06-13 14:14 [PATCH] block: use req_op() to maintain consistency Chaitanya Kulkarni
  2019-06-13 16:54 ` Martin K. Petersen
  2019-06-17  8:41 ` Hannes Reinecke
@ 2019-06-17 15:34 ` Jens Axboe
  2 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2019-06-17 15:34 UTC (permalink / raw)
  To: Chaitanya Kulkarni, linux-block

On 6/13/19 8:14 AM, Chaitanya Kulkarni wrote:
> This is a pure code cleanup patch and doesn't change any functionality.
> In block layer to identify the request operation req_op() macro is
> used, so change the open coding the req_op() in the blk-mq-debugfs.c.

Applied, thanks.

-- 
Jens Axboe


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

end of thread, other threads:[~2019-06-17 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-13 14:14 [PATCH] block: use req_op() to maintain consistency Chaitanya Kulkarni
2019-06-13 16:54 ` Martin K. Petersen
2019-06-17  8:41 ` Hannes Reinecke
2019-06-17 15:34 ` 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).