Files
linux/include/linux
Qian-Yu Lin 04fcbcf2df tracing: Remove local variable for argument detection from trace_printk()
The trace_printk() macro uses a local variable _______STR to detect
whether variadic arguments are present. This name can shadow outer
variables.

Replace the local variable with sizeof applied directly to the
stringified arguments:

  if (sizeof __stringify((__VA_ARGS__)) > 3)

This eliminates the shadowing risk entirely without introducing
any additional includes or local variables.

Verified with objdump on samples/trace_printk that all four cases
branch correctly: __trace_bputs, __trace_puts, __trace_bprintk,
and __trace_printk.

Link: https://patch.msgid.link/20260502075535.34997-1-tiffany019230@gmail.com
Suggested-by: David Laight <david.laight.linux@gmail.com>
Signed-off-by: Qian-Yu Lin <tiffany019230@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2026-05-21 18:03:06 -04:00
..
2026-04-02 15:52:49 +02:00
2026-03-18 15:11:40 +05:30
2026-03-19 23:55:27 +01:00
2026-04-03 16:53:50 -04:00
2026-04-22 12:58:57 -07:00
2026-04-04 08:10:37 -06:00
2026-03-16 13:16:49 +01:00
2026-03-31 19:15:21 +02:00
2026-04-16 07:03:40 -07:00
2026-03-23 13:33:51 -04:00
2026-04-07 17:38:07 +02:00
2026-04-05 13:53:28 -07:00
2026-04-01 10:19:41 +02:00
2026-04-03 16:53:50 -04:00
2026-04-03 16:53:50 -04:00
2026-03-18 09:59:57 +00:00
2026-04-06 11:39:54 +02:00
2026-04-05 13:53:00 -07:00
2026-03-17 15:34:47 +05:30
2026-03-08 11:06:53 +01:00
2026-03-27 07:35:05 -07:00
2026-04-05 13:53:10 -07:00
2026-04-20 11:35:17 -07:00
2026-03-27 17:14:31 -07:00
2026-03-08 11:06:53 +01:00
2026-03-31 07:04:00 -06:00
2026-05-05 16:12:07 +08:00
2026-03-25 20:11:29 +01:00
2026-03-23 12:41:58 +01:00
2026-03-13 08:22:54 +01:00
2026-03-12 15:05:34 +01:00
2026-04-13 08:39:51 -07:00
2026-04-06 09:06:39 +02:00
2026-03-30 16:43:24 -06:00