ARM: omap2: Replace scnprintf with strscpy in omap3_cpuinfo
Subsystems (3)
PATCH RESEND 1/1 ARM: omap2: Replace scnprintf with strscpy in omap3_cpuinfo
Replace scnprintf("%s", ...) with the faster and more direct strscpy().
Signed-off-by Thorsten Blum <[email protected]>
--- arch/arm/mach-omap2/id.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm/mach-omap2/id.c +2 -1
@@ -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);
Signature · 2 lines
Thorsten Blum <[email protected]> GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4
Quoted 3 lines · On Tue, 24 Feb 2026 15:45:51 +0100 Thorsten Blum <[email protected]>…
Replace
scnprintf("%s", ...)with the faster and more directstrscpy().Signed-off-by Thorsten Blum <[email protected]>
Reviewed-by Andreas Kemnade <[email protected]>
Quoted 3 lines · Thorsten Blum
Replace
scnprintf("%s", ...)with the faster and more directstrscpy().
Applied, thanks!
[1/1] ARM: omap2: Replace scnprintf with strscpy in omap3_cpuinfo
commit: 5156a8d92cebb531c320c7cec7e527e40232b922
Best regards,
Signature · 1 line
Kevin Hilman <[email protected]>