mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
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
This commit is contained in:
committed by
Thomas Gleixner
parent
dd9f6d30c6
commit
2dfc417414
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user