From 2dfc417414c6eea4e167b2f46283cded846c531a Mon Sep 17 00:00:00 2001 From: Thorsten Blum Date: Tue, 27 Jan 2026 23:49:49 +0100 Subject: [PATCH] genirq/proc: Replace snprintf with strscpy in register_handler_proc Replace snprintf("%s", ...) with the faster and more direct strscpy(). Signed-off-by: Thorsten Blum Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/20260127224949.441391-2-thorsten.blum@linux.dev --- kernel/irq/proc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index 77258eafbf632..b0999a4f1f688 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c @@ -12,6 +12,7 @@ #include #include #include +#include #include "internals.h" @@ -317,7 +318,7 @@ void register_handler_proc(unsigned int irq, struct irqaction *action) if (!desc->dir || action->dir || !action->name || !name_unique(irq, action)) return; - snprintf(name, MAX_NAMELEN, "%s", action->name); + strscpy(name, action->name); /* create /proc/irq/1234/handler/ */ action->dir = proc_mkdir(name, desc->dir); -- 2.47.3