Thread (4 messages) 4 messages, 4 authors, 2025-07-19
STALE357d LANDED

[PATCH] ring-buffer: make the const read-only 'type' static

From: Colin Ian King <hidden>
Date: 2025-07-14 16:09:29
Also in: kernel-janitors, lkml
Subsystem: the rest, tracing · Maintainers: Linus Torvalds, Steven Rostedt, Masami Hiramatsu

Don't populate the read-only 'type' on the stack at run time,
instead make it static.

Signed-off-by: Colin Ian King <redacted>
---
 kernel/trace/ring_buffer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c
index 00fc38d70e86..39aa1f50274f 100644
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -4118,7 +4118,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
-- 
2.50.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help