Message ID | 20220420184056.7886-2-palmer@rivosinc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | RISC-V: Various XIP fixes | expand |
On Apr 20 2022, Palmer Dabbelt wrote:
> (create_pmd_mpping() ends up skipped on XIP_KERNEL).
Does it? There is always the semicolon left as the body of the
conditional (which is why you get the empty-body warning in the first
place).
On Wed, 20 Apr 2022 15:11:37 PDT (-0700), schwab@linux-m68k.org wrote: > On Apr 20 2022, Palmer Dabbelt wrote: > >> (create_pmd_mpping() ends up skipped on XIP_KERNEL). > > Does it? There is always the semicolon left as the body of the > conditional (which is why you get the empty-body warning in the first > place). Yep, you're right. I fixed up the commit message, thanks!
diff --git a/arch/riscv/mm/init.c b/arch/riscv/mm/init.c index 9535bea8688c..7bc9a21e29fb 100644 --- a/arch/riscv/mm/init.c +++ b/arch/riscv/mm/init.c @@ -567,9 +567,9 @@ static void __init create_p4d_mapping(p4d_t *p4dp, create_pte_mapping(__nextp, __va, __pa, __sz, __prot) #define fixmap_pgd_next ((uintptr_t)fixmap_pte) #define early_dtb_pgd_next ((uintptr_t)early_dtb_pmd) -#define create_p4d_mapping(__pmdp, __va, __pa, __sz, __prot) -#define create_pud_mapping(__pmdp, __va, __pa, __sz, __prot) -#define create_pmd_mapping(__pmdp, __va, __pa, __sz, __prot) +#define create_p4d_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0) +#define create_pud_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0) +#define create_pmd_mapping(__pmdp, __va, __pa, __sz, __prot) do {} while(0) #endif /* __PAGETABLE_PMD_FOLDED */ void __init create_pgd_mapping(pgd_t *pgdp,