Skip to content

Commit dd7664d

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
riscv: Mark KASAN tmp* page tables variables as static
tmp_pg_dir, tmp_p4d and tmp_pud are only used in kasan_init.c so they should be declared as static. Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ Fixes: 96f9d4d ("riscv: Rework kasan population functions") Signed-off-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: [email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 665c51f commit dd7664d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arch/riscv/mm/kasan_init.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
*/
2424

2525
extern pgd_t early_pg_dir[PTRS_PER_PGD];
26-
pgd_t tmp_pg_dir[PTRS_PER_PGD] __page_aligned_bss;
27-
p4d_t tmp_p4d[PTRS_PER_P4D] __page_aligned_bss;
28-
pud_t tmp_pud[PTRS_PER_PUD] __page_aligned_bss;
26+
static pgd_t tmp_pg_dir[PTRS_PER_PGD] __page_aligned_bss;
27+
static p4d_t tmp_p4d[PTRS_PER_P4D] __page_aligned_bss;
28+
static pud_t tmp_pud[PTRS_PER_PUD] __page_aligned_bss;
2929

3030
static void __init kasan_populate_pte(pmd_t *pmd, unsigned long vaddr, unsigned long end)
3131
{

0 commit comments

Comments
 (0)