WSL2-Linux-Kernel/arch/mips/kvm
Huacai Chen 8ef9b32f20 MIPS: KVM: Fix a build warning about variable set but not used
[ Upstream commit 83767a67e7b6a0291cde5681ec7e3708f3f8f877 ]

After commit 411740f542 ("KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU")
old_pte is no longer used in kvm_mips_map_page(). So remove it to fix a
build warning about variable set but not used:

   arch/mips/kvm/mmu.c: In function 'kvm_mips_map_page':
>> arch/mips/kvm/mmu.c:701:29: warning: variable 'old_pte' set but not used [-Wunused-but-set-variable]
     701 |         pte_t *ptep, entry, old_pte;
         |                             ^~~~~~~

Cc: stable@vger.kernel.org
Fixes: 411740f542 ("KVM: MIPS/MMU: Implement KVM_CAP_SYNC_MMU")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202310070530.aARZCSfh-lkp@intel.com/
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-03 07:31:23 +01:00
..
Kconfig MIPS: Remove KVM_TE support 2021-03-10 15:18:48 +01:00
Makefile mips: clean up kvm Makefile 2021-07-22 12:01:25 +02:00
callback.c
emulate.c MIPS: KVM: Fix NULL pointer dereference 2023-07-23 13:47:48 +02:00
entry.c MIPS: Remove KVM_TE support 2021-03-10 15:18:48 +01:00
fpu.S MIPS: KVM: Fix fpu.S misassembly with r6 2016-07-05 16:09:11 +02:00
hypcall.c KVM: MIPS: Implement HYPCALL emulation 2017-03-28 14:53:33 +01:00
interrupt.c MIPS: Remove KVM_TE support 2021-03-10 15:18:48 +01:00
interrupt.h MIPS: Remove KVM_TE support 2021-03-10 15:18:48 +01:00
loongson_ipi.c KVM: MIPS: Add Loongson-3 Virtual IPI interrupt support 2020-06-04 13:50:39 -04:00
mips.c MIPS: KVM: Fix NULL pointer dereference 2023-07-23 13:47:48 +02:00
mmu.c MIPS: KVM: Fix a build warning about variable set but not used 2023-12-03 07:31:23 +01:00
msa.S
stats.c MIPS: kvm: Fix build error with KVM_MIPS_DEBUG_COP0_COUNTERS enabled 2023-07-23 13:47:58 +02:00
tlb.c mips/kvm: Use BUG_ON instead of if condition followed by BUG 2021-06-21 11:40:54 +02:00
trace.h MIPS: KVM: Fix NULL pointer dereference 2023-07-23 13:47:48 +02:00
vz.c MIPS: KVM: Fix NULL pointer dereference 2023-07-23 13:47:48 +02:00