Skip to contentSkip to conversation

KVM: arm64: Remove unreachable break after return

PATCH Applied Osama Abdelkader 3 participants 3 messages Sep 30, 2025 – Oct 1, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 KVM: arm64: Remove unreachable break after return

Remove an unnecessary 'break' statement that follows a 'return' in arch/arm64/kvm/at.c. The break is unreachable.

---
 arch/arm64/kvm/at.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/kvm/at.c +0 -1
index d71ca4ddc9d1..b04c00f95944 100644
@@ -43,7 +43,6 @@ static enum trans_regime compute_translation_regime(struct kvm_vcpu *vcpu, u32 o
 	case OP_AT_S1E2W:
 	case OP_AT_S1E2A:
 		return vcpu_el2_e2h_is_set(vcpu) ? TR_EL20 : TR_EL2;
-		break;
 	default:
 		return (vcpu_el2_e2h_is_set(vcpu) &&
 			vcpu_el2_tge_is_set(vcpu)) ? TR_EL20 : TR_EL10;
Signature · 1 line
2.43.0
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Osama Abdelkader

Remove an unnecessary 'break' statement that follows a 'return' in arch/arm64/kvm/at.c. The break is unreachable.

---
 arch/arm64/kvm/at.c | 1 -
 1 file changed, 1 deletion(-)
arch/arm64/kvm/at.c +0 -0
index d71ca4ddc9d1..b04c00f95944 100644

arch/arm64/kvm/at.c static enum trans_regime compute_translation_regime(struct kvm_vcpu *vcpu, u32 o · line 48

Quoted 7 lines
arch/arm64/kvm/at.c +0 -1
@@ -43,7 +43,6 @@ static enum trans_regime compute_translation_regime(struct kvm_vcpu *vcpu, u32 o
 	case OP_AT_S1E2W:
 	case OP_AT_S1E2A:
 		return vcpu_el2_e2h_is_set(vcpu) ? TR_EL20 : TR_EL2;
-		break;
 	default:
 		return (vcpu_el2_e2h_is_set(vcpu) &&
 			vcpu_el2_tge_is_set(vcpu)) ? TR_EL20 : TR_EL10;

Thanks,
Zenghui

maintainer Applied
#2 lore raw
In reply to Osama Abdelkader
Quoted 4 lines · Osama Abdelkader

Remove an unnecessary 'break' statement that follows a 'return' in arch/arm64/kvm/at.c. The break is unreachable.

Applied to fixes, thanks!

[1/1] KVM: arm64: Remove unreachable break after return

      commit: 55eeaa24c9ac3a22f9c220500e23ee8b6ddff751

Cheers,

	M.
Signature · 1 line
Without deviation from the norm, progress is not possible.