Thread (2 messages) 2 messages, 2 authors, 2025-12-18

Re: [PATCH] tracing: Remove size parameter in __trace_puts()

From: Yury Norov <yury.norov@gmail.com>
Date: 2025-12-18 23:49:11
Also in: lkml

On Thu, Dec 18, 2025 at 04:37:39PM -0500, Steven Rostedt wrote:
From: Steven Rostedt <rostedt@goodmis.org>

The __trace_puts() function takes a string pointer and the size of the
string itself. All users currently simply pass in the strlen() of the
string it is also passing in. There's no reason to pass in the size.
Instead have the __trace_puts() function do the strlen() within the
function itself.

This fixes a header recursion issue where using strlen() in the macro
calling __trace_puts() requires adding #include <linux/string.h> in order
to use strlen(). Removing the use of strlen() from the header fixes the
recursion issue.

Link: https://lore.kernel.org/all/aUN8Hm377C5A0ILX@yury/ (local)

Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Thanks, Steven. I'll take it with v4 of the above.

Thanks,
Yury
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help