Commit 6a1e6bf9 authored by Thorsten Blum's avatar Thorsten Blum Committed by Thomas Bogendoerfer
Browse files

MIPS: generic: Replace deprecated strcpy() in ocelot_detect()

strcpy() is deprecated; use strscpy() instead.

Link: https://github.com/KSPP/linux/issues/88


Signed-off-by: default avatarThorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent e34b690f
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
 *
 * Copyright (c) 2017 Microsemi Corporation
 */
#include <linux/string.h>
#include <asm/machine.h>
#include <asm/prom.h>

@@ -41,7 +42,7 @@ static __init bool ocelot_detect(void)

		if (prom_argc > 1 && strlen(prom_argv[1]) > 0)
			/* ignore all built-in args if any f/w args given */
			strcpy(arcs_cmdline, prom_argv[1]);
			strscpy(arcs_cmdline, prom_argv[1]);
	}

	return true;