Skip to content

Commit 5156a8d

Browse files
tobluxkhilman
authored andcommitted
ARM: omap2: Replace scnprintf with strscpy in omap3_cpuinfo
Replace scnprintf("%s", ...) with the faster and more direct strscpy(). Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Andreas Kemnade <andreas@kemnade.info> Link: https://patch.msgid.link/20260224144552.585272-1-thorsten.blum@linux.dev Signed-off-by: Kevin Hilman <khilman@baylibre.com>
1 parent 6de23f8 commit 5156a8d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • arch/arm/mach-omap2

arch/arm/mach-omap2/id.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <linux/io.h>
1818
#include <linux/random.h>
1919
#include <linux/slab.h>
20+
#include <linux/string.h>
2021

2122
#ifdef CONFIG_SOC_BUS
2223
#include <linux/sys_soc.h>
@@ -250,7 +251,7 @@ static void __init omap3_cpuinfo(void)
250251
cpu_name = "OMAP3503";
251252
}
252253

253-
scnprintf(soc_name, sizeof(soc_name), "%s", cpu_name);
254+
strscpy(soc_name, cpu_name);
254255

255256
/* Print verbose information */
256257
n += scnprintf(buf, sizeof(buf) - n, "%s %s (", soc_name, soc_rev);

0 commit comments

Comments
 (0)