public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 0/2] drm: Use seq_puts() for fixed string output
@ 2026-03-20  7:31 liuqiangneo
  2026-03-20  7:31 ` [PATCH 1/2] drm/debugfs: Replace seq_printf with seq_puts for constant strings liuqiangneo
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: liuqiangneo @ 2026-03-20  7:31 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, tzimmermann, airlied, simona
  Cc: linux-kernel, dri-devel, Qiang Liu

From: Qiang Liu <liuqiang@kylinos.cn>

This series converts seq_printf() calls that only print fixed strings
to seq_puts() which avoids the overhead of format string parsing.

Changes:
- drivers/gpu/drm/drm_debugfs.c
- drivers/gpu/drm/display/drm_dp_mst_topology.c

This has no functional impact on output.

Qiang Liu (2):
  drm/debugfs: Replace seq_printf with seq_puts for constant strings
  drm/dp_mst: Replace seq_printf with seq_puts for constant strings

 drivers/gpu/drm/display/drm_dp_mst_topology.c | 14 +++++++-------
 drivers/gpu/drm/drm_debugfs.c                 |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

-- 
2.43.0


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

* [PATCH 1/2] drm/debugfs: Replace seq_printf with seq_puts for constant strings
  2026-03-20  7:31 [PATCH 0/2] drm: Use seq_puts() for fixed string output liuqiangneo
@ 2026-03-20  7:31 ` liuqiangneo
  2026-03-21 17:54   ` Claude review: " Claude Code Review Bot
  2026-03-20  7:31 ` [PATCH 2/2] drm/dp_mst: " liuqiangneo
  2026-03-21 17:54 ` Claude review: drm: Use seq_puts() for fixed string output Claude Code Review Bot
  2 siblings, 1 reply; 6+ messages in thread
From: liuqiangneo @ 2026-03-20  7:31 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, tzimmermann, airlied, simona
  Cc: linux-kernel, dri-devel, Qiang Liu

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/drm_debugfs.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_debugfs.c b/drivers/gpu/drm/drm_debugfs.c
index ae1c6126c2c5..f9658bdf703e 100644
--- a/drivers/gpu/drm/drm_debugfs.c
+++ b/drivers/gpu/drm/drm_debugfs.c
@@ -66,7 +66,7 @@ static int drm_name_info(struct seq_file *m, void *data)
 		seq_printf(m, " master=%s", master->unique);
 	if (dev->unique)
 		seq_printf(m, " unique=%s", dev->unique);
-	seq_printf(m, "\n");
+	seq_puts(m, "\n");
 	mutex_unlock(&dev->master_mutex);
 
 	return 0;
@@ -139,7 +139,7 @@ static int drm_gem_name_info(struct seq_file *m, void *data)
 	struct drm_debugfs_entry *entry = m->private;
 	struct drm_device *dev = entry->dev;
 
-	seq_printf(m, "  name     size handles refcount\n");
+	seq_puts(m, "  name     size handles refcount\n");
 
 	mutex_lock(&dev->object_name_lock);
 	idr_for_each(&dev->object_name_idr, drm_gem_one_name_info, m);
-- 
2.43.0


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

* [PATCH 2/2] drm/dp_mst: Replace seq_printf with seq_puts for constant strings
  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-20  7:31 ` liuqiangneo
  2026-03-21 17:54   ` Claude review: " Claude Code Review Bot
  2026-03-21 17:54 ` Claude review: drm: Use seq_puts() for fixed string output Claude Code Review Bot
  2 siblings, 1 reply; 6+ messages in thread
From: liuqiangneo @ 2026-03-20  7:31 UTC (permalink / raw)
  To: maarten.lankhorst, mripard, tzimmermann, airlied, simona
  Cc: linux-kernel, dri-devel, Qiang Liu

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


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

* Claude review: drm: Use seq_puts() for fixed string output
  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-20  7:31 ` [PATCH 2/2] drm/dp_mst: " liuqiangneo
@ 2026-03-21 17:54 ` Claude Code Review Bot
  2 siblings, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-03-21 17:54 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: drm: Use seq_puts() for fixed string output
Author: liuqiangneo@163.com
Patches: 3
Reviewed: 2026-03-22T03:54:18.233754

---

This is a straightforward mechanical cleanup series that replaces `seq_printf()` with `seq_puts()` when printing constant strings (no format specifiers). The changes are correct and follow a well-established kernel coding convention. The series has no functional impact — `seq_puts()` simply avoids unnecessary format string parsing overhead.

The patches are clean, properly split by file/subsystem, and correctly described. No issues found.

**Verdict: Acceptable for merge.**

One minor note: `seq_printf(m, "\n")` could also be replaced with `seq_putc(m, '\n')` for a single character, but `seq_puts()` is fine too and consistent with the other changes in the series.

---
Generated by Claude Code Patch Reviewer

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

* Claude review: drm/debugfs: Replace seq_printf with seq_puts for constant strings
  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 Code Review Bot
  0 siblings, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-03-21 17:54 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

Correct and clean. Two replacements in `drivers/gpu/drm/drm_debugfs.c`:

1. `seq_printf(m, "\n")` → `seq_puts(m, "\n")` — valid, no format specifiers.
2. `seq_printf(m, "  name     size handles refcount\n")` → `seq_puts(m, "  name     size handles refcount\n")` — valid, pure constant string.

No concerns.

---
Generated by Claude Code Patch Reviewer

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

* Claude review: drm/dp_mst: Replace seq_printf with seq_puts for constant strings
  2026-03-20  7:31 ` [PATCH 2/2] drm/dp_mst: " liuqiangneo
@ 2026-03-21 17:54   ` Claude Code Review Bot
  0 siblings, 0 replies; 6+ messages in thread
From: Claude Code Review Bot @ 2026-03-21 17:54 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

Correct and clean. Seven replacements in `drivers/gpu/drm/display/drm_dp_mst_topology.c`, all converting `seq_printf()` calls with constant string arguments (no `%` format specifiers) to `seq_puts()`. The surrounding `seq_printf()` calls that *do* use format specifiers (e.g., `%x`, `%d`, `%*ph`) are correctly left unchanged.

No concerns.

---
Generated by Claude Code Patch Reviewer

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

end of thread, other threads:[~2026-03-21 17:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/2] drm/dp_mst: " liuqiangneo
2026-03-21 17:54   ` Claude review: " Claude Code Review Bot
2026-03-21 17:54 ` Claude review: drm: Use seq_puts() for fixed string output Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox