summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2026-01-27 23:49:49 +0100
committerThomas Gleixner <tglx@kernel.org>2026-01-30 08:53:53 +0100
commit2dfc417414c6eea4e167b2f46283cded846c531a (patch)
tree06fd91ed38a021225593f9e22e0b0559e55fed91 /kernel
parentdd9f6d30c64001ca4dde973ac04d8d155e856743 (diff)
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 <thorsten.blum@linux.dev> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Link: https://patch.msgid.link/20260127224949.441391-2-thorsten.blum@linux.dev
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/proc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index 77258eafbf63..b0999a4f1f68 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -12,6 +12,7 @@
#include <linux/interrupt.h>
#include <linux/kernel_stat.h>
#include <linux/mutex.h>
+#include <linux/string.h>
#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);