From: liuqiangneo@163.com
To: maarten.lankhorst@linux.intel.com, mripard@kernel.org,
tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Qiang Liu <liuqiang@kylinos.cn>
Subject: [PATCH 2/2] drm/dp_mst: Replace seq_printf with seq_puts for constant strings
Date: Fri, 20 Mar 2026 15:31:28 +0800 [thread overview]
Message-ID: <20260320073129.145575-3-liuqiangneo@163.com> (raw)
In-Reply-To: <20260320073129.145575-1-liuqiangneo@163.com>
From: Qiang Liu <liuqiang@kylinos.cn>
Replace seq_printf() with seq_puts() when printing constant strings
without format specifiers. This is more efficient as seq_puts()
doesn't need to parse the format string.
Signed-off-by: Qiang Liu <liuqiang@kylinos.cn>
---
drivers/gpu/drm/display/drm_dp_mst_topology.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/display/drm_dp_mst_topology.c b/drivers/gpu/drm/display/drm_dp_mst_topology.c
index d8a732f21d3c..69fe2018eae5 100644
--- a/drivers/gpu/drm/display/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/display/drm_dp_mst_topology.c
@@ -4930,12 +4930,12 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
return;
state = to_drm_dp_mst_topology_state(mgr->base.state);
- seq_printf(m, "\n*** Atomic state info ***\n");
+ seq_puts(m, "\n*** Atomic state info ***\n");
seq_printf(m, "payload_mask: %x, max_payloads: %d, start_slot: %u, pbn_div: %d\n",
state->payload_mask, mgr->max_payloads, state->start_slot,
dfixed_trunc(state->pbn_div));
- seq_printf(m, "\n| idx | port | vcpi | slots | pbn | dsc | status | sink name |\n");
+ seq_puts(m, "\n| idx | port | vcpi | slots | pbn | dsc | status | sink name |\n");
for (i = 0; i < mgr->max_payloads; i++) {
list_for_each_entry(payload, &state->payloads, next) {
char name[14];
@@ -4957,28 +4957,28 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
}
}
- seq_printf(m, "\n*** DPCD Info ***\n");
+ seq_puts(m, "\n*** DPCD Info ***\n");
mutex_lock(&mgr->lock);
if (mgr->mst_primary) {
u8 buf[DP_PAYLOAD_TABLE_SIZE];
int ret;
if (drm_dp_read_dpcd_caps(mgr->aux, buf) < 0) {
- seq_printf(m, "dpcd read failed\n");
+ seq_puts(m, "dpcd read failed\n");
goto out;
}
seq_printf(m, "dpcd: %*ph\n", DP_RECEIVER_CAP_SIZE, buf);
ret = drm_dp_dpcd_read_data(mgr->aux, DP_FAUX_CAP, buf, 2);
if (ret < 0) {
- seq_printf(m, "faux/mst read failed\n");
+ seq_puts(m, "faux/mst read failed\n");
goto out;
}
seq_printf(m, "faux/mst: %*ph\n", 2, buf);
ret = drm_dp_dpcd_read_data(mgr->aux, DP_MSTM_CTRL, buf, 1);
if (ret < 0) {
- seq_printf(m, "mst ctrl read failed\n");
+ seq_puts(m, "mst ctrl read failed\n");
goto out;
}
seq_printf(m, "mst ctrl: %*ph\n", 1, buf);
@@ -4987,7 +4987,7 @@ void drm_dp_mst_dump_topology(struct seq_file *m,
ret = drm_dp_dpcd_read_data(mgr->aux, DP_BRANCH_OUI, buf,
DP_BRANCH_OUI_HEADER_SIZE);
if (ret < 0) {
- seq_printf(m, "branch oui read failed\n");
+ seq_puts(m, "branch oui read failed\n");
goto out;
}
seq_printf(m, "branch oui: %*phN devid: ", 3, buf);
--
2.43.0
next prev parent reply other threads:[~2026-03-20 8:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 7:31 [PATCH 0/2] drm: Use seq_puts() for fixed string output liuqiangneo
2026-03-20 7:31 ` [PATCH 1/2] drm/debugfs: Replace seq_printf with seq_puts for constant strings liuqiangneo
2026-03-21 17:54 ` Claude review: " Claude Code Review Bot
2026-03-20 7:31 ` liuqiangneo [this message]
2026-03-21 17:54 ` Claude review: drm/dp_mst: " Claude Code Review Bot
2026-03-21 17:54 ` Claude review: drm: Use seq_puts() for fixed string output Claude Code Review Bot
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=20260320073129.145575-3-liuqiangneo@163.com \
--to=liuqiangneo@163.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuqiang@kylinos.cn \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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