linux/arch/riscv/kernel/pi
Thorsten Blum b954dba17b riscv: pi: replace strlcat with strscpy in get_early_cmdline
Use the return value of strscpy() instead of calling strlen(fdt_cmdline)
again and return early on string truncation. Drop the explicit size
argument since early_cmdline has a fixed length, which strscpy()
determines using sizeof() when the argument is omitted.

Replace strlcat() with strscpy() to append CONFIG_CMDLINE.

Also remove the unnecessary fdt_cmdline NULL initialization.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260504154924.141566-3-thorsten.blum@linux.dev
Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-06-06 20:17:52 -06:00
..
archrandom_early.c RISC-V: Use Zkr to seed KASLR base address 2024-08-05 12:06:41 -07:00
cmdline_early.c riscv: pi: replace strlcat with strscpy in get_early_cmdline 2026-06-06 20:17:52 -06:00
fdt_early.c riscv: mm: Use mmu-type from FDT to limit SATP mode 2025-09-18 08:18:14 -06:00
Makefile riscv: pi: use 'targets' instead of extra-y in Makefile 2025-09-18 08:20:56 -06:00
pi.h riscv: mm: Use mmu-type from FDT to limit SATP mode 2025-09-18 08:18:14 -06:00