Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Thorsten Blum and committed by
Kevin Hilman
5156a8d9 6de23f81

+2 -1
+2 -1
arch/arm/mach-omap2/id.c
··· 17 17 #include <linux/io.h> 18 18 #include <linux/random.h> 19 19 #include <linux/slab.h> 20 + #include <linux/string.h> 20 21 21 22 #ifdef CONFIG_SOC_BUS 22 23 #include <linux/sys_soc.h> ··· 251 250 cpu_name = "OMAP3503"; 252 251 } 253 252 254 - scnprintf(soc_name, sizeof(soc_name), "%s", cpu_name); 253 + strscpy(soc_name, cpu_name); 255 254 256 255 /* Print verbose information */ 257 256 n += scnprintf(buf, sizeof(buf) - n, "%s %s (", soc_name, soc_rev);