projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd9f6d3
)
genirq/proc: Replace snprintf with strscpy in register_handler_proc
author
Thorsten Blum
<thorsten.blum@linux.dev>
Tue, 27 Jan 2026 22:49:49 +0000
(23:49 +0100)
committer
Thomas Gleixner
<tglx@kernel.org>
Fri, 30 Jan 2026 07:53:53 +0000
(08:53 +0100)
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
kernel/irq/proc.c
patch
|
blob
|
history
diff --git
a/kernel/irq/proc.c
b/kernel/irq/proc.c
index
77258ea
..
b0999a4
100644
(file)
--- 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;
- s
nprintf(name, MAX_NAMELEN, "%s"
, action->name);
+ s
trscpy(name
, action->name);
/* create /proc/irq/1234/handler/ */
action->dir = proc_mkdir(name, desc->dir);