]> 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:26:26 +0000 (15:26 +0200)
commit1b5bfaed35da7712a706650cff93d825e171e8d0
treed75c9ac91649f06a5486e0e927e8e06e83f3cc33
parent5fc3883a889d8a61b450840b3b82e6060b36f933
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