]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ring-buffer: Make the const read-only 'type' static
authorColin Ian King <colin.i.king@gmail.com>
Mon, 14 Jul 2025 16:08:58 +0000 (17:08 +0100)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 29 Jul 2025 19:08:57 +0000 (15:08 -0400)
Don't populate the read-only 'type' on the stack at run time,
instead make it static.

Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/20250714160858.1234719-1-colin.i.king@gmail.com
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c

index 903d9db75e12edb493746b4b41d13a751e117a35..5176e0270f072541743a6bc9a5787c68ed75006f 100644 (file)
@@ -4216,7 +4216,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_unlock_commit);
 
 static const char *show_irq_str(int bits)
 {
-       const char *type[] = {
+       static const char * type[] = {
                ".",    // 0
                "s",    // 1
                "h",    // 2