riscv: Use __maybe_unused instead of #ifdefs around variable declarations

This allows to simplify the code and make it more readable.

Signed-off-by: Alexandre Ghiti <alex@ghiti.fr>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
This commit is contained in:
Alexandre Ghiti
2021-08-11 22:41:31 -07:00
committed by Palmer Dabbelt
parent 526f83df1d
commit 6f3e5fd241
+1 -3
View File
@@ -532,9 +532,7 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early)
asmlinkage void __init setup_vm(uintptr_t dtb_pa)
{
uintptr_t __maybe_unused pa;
#ifndef __PAGETABLE_PMD_FOLDED
pmd_t fix_bmap_spmd, fix_bmap_epmd;
#endif
pmd_t __maybe_unused fix_bmap_spmd, fix_bmap_epmd;
kernel_map.virt_addr = KERNEL_LINK_ADDR;