Linux Trace Kernel
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: linux-trace-kernel@vger.kernel.org,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
	Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, kernel-janitors@vger.kernel.org
Subject: [PATCH v2 1/2] tracing/user_events: Use seq_putc() in two functions
Date: Mon, 22 Jun 2026 17:10:16 +0200	[thread overview]
Message-ID: <6bcaa4da-05c6-4097-90f5-3969f8a1dfbc@web.de> (raw)
In-Reply-To: <6a37c46d-588d-406f-88fa-2f8562709e5f@web.de>

From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 22 Jun 2026 16:37:18 +0200

Single characters should be put into a sequence. Thus use the corresponding
function “seq_putc” for selected calls.

The source code was transformed by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
 kernel/trace/trace_events_user.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/kernel/trace/trace_events_user.c b/kernel/trace/trace_events_user.c
index c4ba484f7b38..a79b7c07dabb 100644
--- a/kernel/trace/trace_events_user.c
+++ b/kernel/trace/trace_events_user.c
@@ -1813,7 +1813,7 @@ static int user_event_show(struct seq_file *m, struct dyn_event *ev)
 
 	list_for_each_entry_reverse(field, head, link) {
 		if (depth == 0)
-			seq_puts(m, " ");
+			seq_putc(m, ' ');
 		else
 			seq_puts(m, "; ");
 
@@ -1825,7 +1825,7 @@ static int user_event_show(struct seq_file *m, struct dyn_event *ev)
 		depth++;
 	}
 
-	seq_puts(m, "\n");
+	seq_putc(m, '\n');
 
 	return 0;
 }
@@ -2794,13 +2794,13 @@ static int user_seq_show(struct seq_file *m, void *p)
 			busy++;
 		}
 
-		seq_puts(m, "\n");
+		seq_putc(m, '\n');
 		active++;
 	}
 
 	mutex_unlock(&group->reg_mutex);
 
-	seq_puts(m, "\n");
+	seq_putc(m, '\n');
 	seq_printf(m, "Active: %d\n", active);
 	seq_printf(m, "Busy: %d\n", busy);
 
-- 
2.54.0


  reply	other threads:[~2026-06-22 15:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-04 12:05 [PATCH 0/3] tracing/user_events: More efficient data output in user_seq_show() Markus Elfring
2026-06-04 12:07 ` [PATCH 1/3] tracing/user_events: Simplify " Markus Elfring
2026-06-09 16:13   ` Steven Rostedt
2026-06-09 16:44     ` Markus Elfring
2026-06-11 12:59       ` Steven Rostedt
2026-06-22 15:07         ` [PATCH v2 0/2] tracing/user_events: More efficient data output in two functions Markus Elfring
2026-06-22 15:10           ` Markus Elfring [this message]
2026-06-22 15:11           ` [PATCH v2 2/2] tracing/user_events: Replace a seq_printf() call by seq_puts() in user_seq_show() Markus Elfring
2026-06-04 12:10 ` [PATCH 2/3] tracing/user_events: Use seq_putc() " Markus Elfring
2026-06-04 12:12 ` [PATCH 3/3] tracing/user_events: Replace a seq_printf() call by seq_puts() " 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=6bcaa4da-05c6-4097-90f5-3969f8a1dfbc@web.de \
    --to=markus.elfring@web.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mhiramat@kernel.org \
    --cc=rostedt@goodmis.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