]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ARM: omap2: Replace scnprintf with strscpy in omap3_cpuinfo
authorThorsten Blum <thorsten.blum@linux.dev>
Tue, 24 Feb 2026 14:45:51 +0000 (15:45 +0100)
committerKevin Hilman <khilman@baylibre.com>
Fri, 6 Mar 2026 00:41:59 +0000 (16:41 -0800)
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>
arch/arm/mach-omap2/id.c

index 43f5944850e6161f3dd730c0c1efe17b5e1ae8e3..cf2bfb447ee288cc758ef8b9e0865ed05bf75c49 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/io.h>
 #include <linux/random.h>
 #include <linux/slab.h>
+#include <linux/string.h>
 
 #ifdef CONFIG_SOC_BUS
 #include <linux/sys_soc.h>
@@ -250,7 +251,7 @@ static void __init omap3_cpuinfo(void)
                cpu_name = "OMAP3503";
        }
 
-       scnprintf(soc_name, sizeof(soc_name), "%s", cpu_name);
+       strscpy(soc_name, cpu_name);
 
        /* Print verbose information */
        n += scnprintf(buf, sizeof(buf) - n, "%s %s (", soc_name, soc_rev);