Skip to content

Commit 33d418d

Browse files
Alexandre Ghitipalmer-dabbelt
authored andcommitted
riscv: Fix unused variable warning when BUILTIN_DTB is set
commit ef69d25 ("riscv: Move early dtb mapping into the fixmap region") wrongly moved the #ifndef CONFIG_BUILTIN_DTB surrounding the pa variable definition in create_fdt_early_page_table(), so move it back to its right place to quiet the following warning: ../arch/riscv/mm/init.c: In function ‘create_fdt_early_page_table’: ../arch/riscv/mm/init.c:925:12: warning: unused variable ‘pa’ [-Wunused-variable] 925 | uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1); Fixes: ef69d25 ("riscv: Move early dtb mapping into the fixmap region") Signed-off-by: Alexandre Ghiti <[email protected]> Reviewed-by: Conor Dooley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 3b90b09 commit 33d418d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/riscv/mm/init.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,9 +922,9 @@ static void __init create_kernel_page_table(pgd_t *pgdir, bool early)
922922
static void __init create_fdt_early_page_table(uintptr_t fix_fdt_va,
923923
uintptr_t dtb_pa)
924924
{
925+
#ifndef CONFIG_BUILTIN_DTB
925926
uintptr_t pa = dtb_pa & ~(PMD_SIZE - 1);
926927

927-
#ifndef CONFIG_BUILTIN_DTB
928928
/* Make sure the fdt fixmap address is always aligned on PMD size */
929929
BUILD_BUG_ON(FIX_FDT % (PMD_SIZE / PAGE_SIZE));
930930

0 commit comments

Comments
 (0)