Commit be5b52dc authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'nios2_updates_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux

Pull nios2 updates from Dinh Nguyen:

 - Convert pgtable constructor/destructors to ptdesc

 - Replace strlcpy with strscpy

* tag 'nios2_updates_for_v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
  nios2: Replace all non-returning strlcpy with strscpy
  nios2: Convert __pte_free_tlb() to use ptdescs
parents 6995e2de 6a22e017
......@@ -30,8 +30,8 @@ extern pgd_t *pgd_alloc(struct mm_struct *mm);
#define __pte_free_tlb(tlb, pte, addr) \
do { \
pgtable_pte_page_dtor(pte); \
tlb_remove_page((tlb), (pte)); \
pagetable_pte_dtor(page_ptdesc(pte)); \
tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte))); \
} while (0)
#endif /* _ASM_NIOS2_PGALLOC_H */
......@@ -47,7 +47,7 @@ void __init setup_cpuinfo(void)
str = of_get_property(cpu, "altr,implementation", &len);
if (str)
strlcpy(cpuinfo.cpu_impl, str, sizeof(cpuinfo.cpu_impl));
strscpy(cpuinfo.cpu_impl, str, sizeof(cpuinfo.cpu_impl));
else
strcpy(cpuinfo.cpu_impl, "<unknown>");
......
......@@ -121,7 +121,7 @@ asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
dtb_passed = r6;
if (r7)
strlcpy(cmdline_passed, (char *)r7, COMMAND_LINE_SIZE);
strscpy(cmdline_passed, (char *)r7, COMMAND_LINE_SIZE);
}
#endif
......@@ -129,10 +129,10 @@ asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
#ifndef CONFIG_CMDLINE_FORCE
if (cmdline_passed[0])
strlcpy(boot_command_line, cmdline_passed, COMMAND_LINE_SIZE);
strscpy(boot_command_line, cmdline_passed, COMMAND_LINE_SIZE);
#ifdef CONFIG_NIOS2_CMDLINE_IGNORE_DTB
else
strlcpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
strscpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
#endif
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment