]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
m68k: setup: Remove size argument when calling strscpy()
authorThorsten Blum <thorsten.blum@linux.dev>
Sun, 2 Mar 2025 23:05:31 +0000 (00:05 +0100)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Mon, 10 Mar 2025 13:06:38 +0000 (14:06 +0100)
The size parameter of strscpy() is optional and specifying the size of
the destination buffer is unnecessary. Remove it to simplify the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@yoseli.org>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/20250302230532.245884-2-thorsten.blum@linux.dev
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
arch/m68k/kernel/setup_mm.c

index 15c1a595a1de0bef7e6565b7a6e02d773c23bb8c..3bc28bc512acd8770d7b511d29cec856ce6f1fc7 100644 (file)
@@ -147,8 +147,7 @@ static void __init m68k_parse_bootinfo(const struct bi_record *record)
                        break;
 
                case BI_COMMAND_LINE:
-                       strscpy(m68k_command_line, data,
-                               sizeof(m68k_command_line));
+                       strscpy(m68k_command_line, data);
                        break;
 
                case BI_RNG_SEED: {