From: Alexandre Ghiti Date: Fri, 23 Jul 2021 13:01:26 +0000 (+0200) Subject: riscv: Use __maybe_unused instead of #ifdefs around variable declarations X-Git-Tag: accepted/tizen/unified/20230118.172025~6458^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6f3e5fd241c33d2407f7aaa930b141af6ad7c35b;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Palmer Dabbelt --- diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 83d0ed9..a456b5a 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -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;