Skip to content

Commit 3c6eb64

Browse files
ptosioupton
authored andcommitted
KVM: arm64: VHE: Mark __hyp_call_panic __noreturn
Given that the sole purpose of __hyp_call_panic() is to call panic(), a __noreturn function, give it the __noreturn attribute, removing the need for its caller to use unreachable(). Signed-off-by: Pierre-Clément Tosi <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Oliver Upton <[email protected]>
1 parent 4ab3f9d commit 3c6eb64

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arch/arm64/kvm/hyp/vhe/switch.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ int __kvm_vcpu_run(struct kvm_vcpu *vcpu)
388388
return ret;
389389
}
390390

391-
static void __hyp_call_panic(u64 spsr, u64 elr, u64 par)
391+
static void __noreturn __hyp_call_panic(u64 spsr, u64 elr, u64 par)
392392
{
393393
struct kvm_cpu_context *host_ctxt;
394394
struct kvm_vcpu *vcpu;
@@ -413,7 +413,6 @@ void __noreturn hyp_panic(void)
413413
u64 par = read_sysreg_par();
414414

415415
__hyp_call_panic(spsr, elr, par);
416-
unreachable();
417416
}
418417

419418
asmlinkage void kvm_unexpected_el2_exception(void)

0 commit comments

Comments
 (0)