summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@mips.com>2019-07-17 21:49:10 +0200
committerPaul Burton <paul.burton@mips.com>2019-07-18 23:41:04 +0200
commit5bbe54346b539b5938b65d542b6ff5e956c3c08d (patch)
tree014804f6211f0a1e138ff7d3426e72b86a77694b /arch
parentmips: fix cacheinfo (diff)
downloadlinux-5bbe54346b539b5938b65d542b6ff5e956c3c08d.tar.xz
linux-5bbe54346b539b5938b65d542b6ff5e956c3c08d.zip
MIPS: Annotate fall-through in kvm/emulate.c
kvm_compute_return_epc contains a switch statement with an intentional fall-through from a case handling jal (jump and link) instructions to one handling j (jump) instructions. With -Wimplicit-fallthrough this triggers a compile error (due to -Werror being enabled for arch/mips). This can be reproduced using malta_kvm_defconfig. Fix this by annotating the intentional fall-through. Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: linux-mips@vger.kernel.org
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/kvm/emulate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/kvm/emulate.c b/arch/mips/kvm/emulate.c
index e5de6bac8197..754094b40a75 100644
--- a/arch/mips/kvm/emulate.c
+++ b/arch/mips/kvm/emulate.c
@@ -140,6 +140,7 @@ static int kvm_compute_return_epc(struct kvm_vcpu *vcpu, unsigned long instpc,
/* These are unconditional and in j_format. */
case jal_op:
arch->gprs[31] = instpc + 8;
+ /* fall through */
case j_op:
epc += 4;
epc >>= 28;