]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tracing: remove size parameter in __trace_puts()
authorSteven Rostedt <rostedt@goodmis.org>
Fri, 16 Jan 2026 04:25:08 +0000 (23:25 -0500)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 1 Feb 2026 00:16:05 +0000 (16:16 -0800)
commit86e685ff364394b477cd1c476029480a2a1960c5
treeba2a8a59cbbbba0de258e1f200276b748083e284
parent269586d68994ca307ded058255e243692e3bf753
tracing: remove size parameter in __trace_puts()

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/
Link: https://lkml.kernel.org/r/20260116042510.241009-6-ynorov@nvidia.com
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Joel Fernandes <joelagnelf@nvidia.com>
Cc: Aaron Tomlin <atomlin@atomlin.com>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
Cc: Christophe Leroy (CS GROUP) <chleroy@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Petr Pavlu <petr.pavlu@suse.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/kernel.h
kernel/trace/trace.c
kernel/trace/trace.h