summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorsten Blum <thorsten.blum@linux.dev>2025-08-17 20:37:11 +0200
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>2025-08-29 22:34:29 +0200
commite5a6d4a23acfe56749c7543ef55c54b8b903616b (patch)
tree1faf90134d5f274ece8f11c3bddcdc0f6e1669dd
parentcb96fd880ef78500b34d10fa76ddd3fa070287d6 (diff)
MIPS: sgi-ip22: Replace deprecated strcpy() in plat_mem_setup()
strcpy() is deprecated; use strscpy() instead. Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
-rw-r--r--arch/mips/sgi-ip22/ip22-setup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/sgi-ip22/ip22-setup.c b/arch/mips/sgi-ip22/ip22-setup.c
index e06a818fe792..f083b25be13b 100644
--- a/arch/mips/sgi-ip22/ip22-setup.c
+++ b/arch/mips/sgi-ip22/ip22-setup.c
@@ -11,6 +11,7 @@
#include <linux/types.h>
#include <linux/console.h>
#include <linux/sched.h>
+#include <linux/string.h>
#include <linux/tty.h>
#include <asm/addrspace.h>
@@ -65,7 +66,7 @@ void __init plat_mem_setup(void)
static char options[8] __initdata;
char *baud = ArcGetEnvironmentVariable("dbaud");
if (baud)
- strcpy(options, baud);
+ strscpy(options, baud);
add_preferred_console("ttyS", *(ctype + 1) == '2' ? 1 : 0,
baud ? options : NULL);
} else if (!ctype || *ctype != 'g') {