]> git.itanic.dy.fi Git - linux-stable/commit
RISC-V: Fix up a cherry-pick warning in setup_vm_final()
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Tue, 9 May 2023 12:51:41 +0000 (14:51 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 May 2023 09:50:31 +0000 (11:50 +0200)
commitde9a3ed42333bef494a4a67b92f03860ee837a62
tree7e6740710cf72888b7a6aab482a3722f1be7ea9d
parent3c9b08a16978eebfadd1c88af17f840ef3a93ede
RISC-V: Fix up a cherry-pick warning in setup_vm_final()

This triggers a -Wdeclaration-after-statement as the code has changed a
bit since upstream.  It might be better to hoist the whole block up, but
this is a smaller change so I went with it.

arch/riscv/mm/init.c:755:16: warning: mixing declarations and code is a C99 extension [-Wdeclaration-after-statement]
             unsigned long idx = pgd_index(__fix_to_virt(FIX_FDT));
                           ^
     1 warning generated.

Fixes: bbf94b042155 ("riscv: Move early dtb mapping into the fixmap region")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202304300429.SXZOA5up-lkp@intel.com/
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/riscv/mm/init.c