Skip to content

Commit be5b52d

Browse files
committed
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
2 parents 6995e2d + 6a22e01 commit be5b52d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

arch/nios2/include/asm/pgalloc.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ static inline void pmd_populate(struct mm_struct *mm, pmd_t *pmd,
2828

2929
extern pgd_t *pgd_alloc(struct mm_struct *mm);
3030

31-
#define __pte_free_tlb(tlb, pte, addr) \
32-
do { \
33-
pgtable_pte_page_dtor(pte); \
34-
tlb_remove_page((tlb), (pte)); \
31+
#define __pte_free_tlb(tlb, pte, addr) \
32+
do { \
33+
pagetable_pte_dtor(page_ptdesc(pte)); \
34+
tlb_remove_page_ptdesc((tlb), (page_ptdesc(pte))); \
3535
} while (0)
3636

3737
#endif /* _ASM_NIOS2_PGALLOC_H */

arch/nios2/kernel/cpuinfo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ void __init setup_cpuinfo(void)
4747

4848
str = of_get_property(cpu, "altr,implementation", &len);
4949
if (str)
50-
strlcpy(cpuinfo.cpu_impl, str, sizeof(cpuinfo.cpu_impl));
50+
strscpy(cpuinfo.cpu_impl, str, sizeof(cpuinfo.cpu_impl));
5151
else
5252
strcpy(cpuinfo.cpu_impl, "<unknown>");
5353

arch/nios2/kernel/setup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,18 +121,18 @@ asmlinkage void __init nios2_boot_init(unsigned r4, unsigned r5, unsigned r6,
121121
dtb_passed = r6;
122122

123123
if (r7)
124-
strlcpy(cmdline_passed, (char *)r7, COMMAND_LINE_SIZE);
124+
strscpy(cmdline_passed, (char *)r7, COMMAND_LINE_SIZE);
125125
}
126126
#endif
127127

128128
early_init_devtree((void *)dtb_passed);
129129

130130
#ifndef CONFIG_CMDLINE_FORCE
131131
if (cmdline_passed[0])
132-
strlcpy(boot_command_line, cmdline_passed, COMMAND_LINE_SIZE);
132+
strscpy(boot_command_line, cmdline_passed, COMMAND_LINE_SIZE);
133133
#ifdef CONFIG_NIOS2_CMDLINE_IGNORE_DTB
134134
else
135-
strlcpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
135+
strscpy(boot_command_line, CONFIG_CMDLINE, COMMAND_LINE_SIZE);
136136
#endif
137137
#endif
138138

0 commit comments

Comments
 (0)