[PATCH 3/5] riscv: Use __maybe_unused instead of #ifdefs around variable declarations

From: Alexandre Ghiti
Date: Fri Jul 23 2021 - 09:04:48 EST


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

Signed-off-by: Alexandre Ghiti <alex@xxxxxxxx>
---
arch/riscv/mm/init.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c
index e35df3e1c9a3..6b29c5791555 100644
--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -538,9 +538,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;

--
2.30.2