From: Markus Elfring <Markus.Elfring@web.de>
To: linux-block@vger.kernel.org, Jens Axboe <axboe@kernel.dk>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH] blk-mq: Use seq_puts() in __blk_mq_debugfs_rq_show()
Date: Mon, 1 Jul 2019 21:27:25 +0200 [thread overview]
Message-ID: <81847ca5-fac5-710c-29d5-f70b58f6437d@web.de> (raw)
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 1 Jul 2019 21:21:04 +0200
A string which did not contain a data format specification should be put
into a sequence. Thus use the corresponding function “seq_puts”.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
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 748164f4e8b1..bc1b70aeb2ca 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -331,7 +331,7 @@ int __blk_mq_debugfs_rq_show(struct seq_file *m, struct request *rq)
if (strcmp(op_str, "UNKNOWN") == 0)
seq_printf(m, "%u", op);
else
- seq_printf(m, "%s", op_str);
+ seq_puts(m, op_str);
seq_puts(m, ", .cmd_flags=");
blk_flags_show(m, rq->cmd_flags & ~REQ_OP_MASK, cmd_flag_name,
ARRAY_SIZE(cmd_flag_name));
--
2.22.0
next reply other threads:[~2019-07-01 19:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-01 19:27 Markus Elfring [this message]
2019-07-01 19:47 ` [PATCH] blk-mq: Use seq_puts() in __blk_mq_debugfs_rq_show() Bart Van Assche
2019-07-01 20:00 ` Markus Elfring
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=81847ca5-fac5-710c-29d5-f70b58f6437d@web.de \
--to=markus.elfring@web.de \
--cc=axboe@kernel.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).