block: use right format specifier for op
authorChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Wed, 19 Jun 2019 22:01:49 +0000 (15:01 -0700)
committerJens Axboe <axboe@kernel.dk>
Thu, 20 Jun 2019 09:20:03 +0000 (03:20 -0600)
In function __blk_mq_debugfs_rq_show variable op has unsigned int type.
Since op can never be negative use %u format specifier to match the
variable type.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-debugfs.c

index 8439483..03b6aab 100644 (file)
@@ -347,7 +347,7 @@ int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq)
        if (op < ARRAY_SIZE(op_name) && op_name[op])
                seq_printf(m, "%s", op_name[op]);
        else
-               seq_printf(m, "%d", op);
+               seq_printf(m, "%u", op);
        seq_puts(m, ", .cmd_flags=");
        blk_flags_show(m, rq->cmd_flags & ~REQ_OP_MASK, cmd_flag_name,
                       ARRAY_SIZE(cmd_flag_name));