Patch "RISC-V: Fix up a cherry-pick warning in setup_vm_final()" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    RISC-V: Fix up a cherry-pick warning in setup_vm_final()

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     risc-v-fix-up-a-cherry-pick-warning-in-setup_vm_final.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From alexghiti@xxxxxxxxxxxx  Mon May 15 14:41:21 2023
From: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Date: Tue,  9 May 2023 14:51:41 +0200
Subject: RISC-V: Fix up a cherry-pick warning in setup_vm_final()
To: stable@xxxxxxxxxxxxxxx
Cc: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>, kernel test robot <lkp@xxxxxxxxx>, Palmer Dabbelt <palmer@xxxxxxxxxxxx>
Message-ID: <20230509125141.95587-1-alexghiti@xxxxxxxxxxxx>


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@xxxxxxxxx>
Link: https://lore.kernel.org/oe-kbuild-all/202304300429.SXZOA5up-lkp@xxxxxxxxx/
Signed-off-by: Palmer Dabbelt <palmer@xxxxxxxxxxxx>
Signed-off-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 arch/riscv/mm/init.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/riscv/mm/init.c
+++ b/arch/riscv/mm/init.c
@@ -714,6 +714,7 @@ static void __init setup_vm_final(void)
 {
 	uintptr_t va, map_size;
 	phys_addr_t pa, start, end;
+	unsigned long idx __maybe_unused;
 	u64 i;
 
 	/**
@@ -733,7 +734,7 @@ static void __init setup_vm_final(void)
 	 * directly in swapper_pg_dir in addition to the pgd entry that points
 	 * to fixmap_pte.
 	 */
-	unsigned long idx = pgd_index(__fix_to_virt(FIX_FDT));
+	idx = pgd_index(__fix_to_virt(FIX_FDT));
 
 	set_pgd(&swapper_pg_dir[idx], early_pg_dir[idx]);
 #endif


Patches currently in stable-queue which might be from alexghiti@xxxxxxxxxxxx are

queue-5.15/risc-v-mm-enable-huge-page-support-to-kernel_page_pr.patch
queue-5.15/risc-v-fix-up-a-cherry-pick-warning-in-setup_vm_final.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux