Skip to content

Commit

Permalink
Merge tag 'nios2_updates_for_v6.5' of git://git.kernel.org/pub/scm/li…
Browse files Browse the repository at this point in the history
…nux/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
  • Loading branch information
torvalds committed Jun 26, 2023
2 parents 6995e2d + 6a22e01 commit be5b52d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions arch/nios2/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,

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)); \
#define __pte_free_tlb(tlb, pte, addr) \
do { \
pagetable_pte_dtor(page_ptdesc(pte)); \
tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte))); \
} while (0)

#endif /* _ASM_NIOS2_PGALLOC_H */
2 changes: 1 addition & 1 deletion arch/nios2/kernel/cpuinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>");

Expand Down
6 changes: 3 additions & 3 deletions arch/nios2/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,18 +121,18 @@ 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

early_init_devtree((void *)dtb_passed);

#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

Expand Down

0 comments on commit be5b52d

Please sign in to comment.