]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/kvm: Fix ifdef to remove build warning
authorMadhavan Srinivasan <maddy@linux.ibm.com>
Sun, 18 May 2025 04:41:04 +0000 (10:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Sep 2025 13:31:45 +0000 (15:31 +0200)
commiteb7eafbfd1a27371228baa30c1a4087f2ce54134
treed3253b63dc05a8b9f501992bc0f3697c50d79d6d
parent7d5cc22efa44e0fe321ce195c71c3d7da211fbb2
powerpc/kvm: Fix ifdef to remove build warning

[ Upstream commit 88688a2c8ac6c8036d983ad8b34ce191c46a10aa ]

When compiling for pseries or powernv defconfig with "make C=1",
these warning were reported bu sparse tool in powerpc/kernel/kvm.c

arch/powerpc/kernel/kvm.c:635:9: warning: switch with no cases
arch/powerpc/kernel/kvm.c:646:9: warning: switch with no cases

Currently #ifdef were added after the switch case which are specific
for BOOKE and PPC_BOOK3S_32. These are not enabled in pseries/powernv
defconfig. Fix it by moving the #ifdef before switch(){}

Fixes: cbe487fac7fc0 ("KVM: PPC: Add mtsrin PV code")
Tested-by: Venkat Rao Bagalkote <venkat88@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250518044107.39928-1-maddy@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/kvm.c