[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260131122238.493577-2-thorsten.blum@linux.dev>
Date: Sat, 31 Jan 2026 13:22:38 +0100
From: Thorsten Blum <thorsten.blum@...ux.dev>
To: Aaro Koskinen <aaro.koskinen@....fi>,
Andreas Kemnade <andreas@...nade.info>,
Kevin Hilman <khilman@...libre.com>,
Roger Quadros <rogerq@...nel.org>,
Tony Lindgren <tony@...mide.com>,
Russell King <linux@...linux.org.uk>
Cc: Thorsten Blum <thorsten.blum@...ux.dev>,
linux-omap@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] 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@...ux.dev>
---
arch/arm/mach-omap2/id.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-omap2/id.c b/arch/arm/mach-omap2/id.c
index 7f387706368a..068c6dfa3a48 100644
--- a/arch/arm/mach-omap2/id.c
+++ b/arch/arm/mach-omap2/id.c
@@ -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);
--
Thorsten Blum <thorsten.blum@...ux.dev>
GPG: 1D60 735E 8AEF 3BE4 73B6 9D84 7336 78FD 8DFE EAD4
Powered by blists - more mailing lists