summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/mips/kernel/prom.c6
-rw-r--r--arch/mips/kernel/relocate.c2
-rw-r--r--arch/mips/pic32/pic32mzda/init.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c
index 7db6ff9aed7d..f88ce78e13e3 100644
--- a/arch/mips/kernel/prom.c
+++ b/arch/mips/kernel/prom.c
@@ -26,7 +26,7 @@ __init void mips_set_machine_name(const char *name)
if (name == NULL)
return;
- strlcpy(mips_machine_name, name, sizeof(mips_machine_name));
+ strscpy(mips_machine_name, name, sizeof(mips_machine_name));
pr_info("MIPS: machine is %s\n", mips_get_machine_name());
}
@@ -52,9 +52,9 @@ int __init __dt_register_buses(const char *bus0, const char *bus1)
if (!of_have_populated_dt())
panic("device tree not present");
- strlcpy(of_ids[0].compatible, bus0, sizeof(of_ids[0].compatible));
+ strscpy(of_ids[0].compatible, bus0, sizeof(of_ids[0].compatible));
if (bus1) {
- strlcpy(of_ids[1].compatible, bus1,
+ strscpy(of_ids[1].compatible, bus1,
sizeof(of_ids[1].compatible));
}
diff --git a/arch/mips/kernel/relocate.c b/arch/mips/kernel/relocate.c
index 56b51de2dc51..58fc8d089402 100644
--- a/arch/mips/kernel/relocate.c
+++ b/arch/mips/kernel/relocate.c
@@ -340,7 +340,7 @@ void *__init relocate_kernel(void)
early_init_dt_scan(fdt);
if (boot_command_line[0]) {
/* Boot command line was passed in device tree */
- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
+ strscpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
}
#endif /* CONFIG_USE_OF */
diff --git a/arch/mips/pic32/pic32mzda/init.c b/arch/mips/pic32/pic32mzda/init.c
index d9c8c4e46aff..08c46cf122d7 100644
--- a/arch/mips/pic32/pic32mzda/init.c
+++ b/arch/mips/pic32/pic32mzda/init.c
@@ -44,7 +44,7 @@ void __init plat_mem_setup(void)
pr_info(" builtin_cmdline : %s\n", CONFIG_CMDLINE);
#endif
if (dtb != __dtb_start)
- strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
+ strscpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);
#ifdef CONFIG_EARLY_PRINTK
fw_init_early_console(-1);