Thread (14 messages) 14 messages, 5 authors, 2026-01-21

Re: [PATCH v5 5/6] tracing: Remove size parameter in __trace_puts()

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2026-01-16 10:41:57
Also in: dri-devel, intel-gfx, linux-trace-kernel, lkml

On Thu, Jan 15, 2026 at 11:25:08PM -0500, Yury Norov wrote:
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.
I like this change, it unloads the header dependencies from string.h, however
the latter is not that messed up.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

-- 
With Best Regards,
Andy Shevchenko

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