KVM: arm64: Don't return from void function
[ Upstream commit1c3ace2b8b] Although harmless, the return statement in kvm_unexpected_el2_exception is rather confusing as the function itself has a void return type. The C standard is also pretty clear that "A return statement with an expression shall not appear in a function whose return type is void". Given that this return statement does not seem to add any actual value, let's not pointlessly violate the standard. Build-tested with GCC 10 and CLANG 13 for good measure, the disassembled code is identical with or without the return statement. Fixes:e9ee186bb7("KVM: arm64: Add kvm_extable for vaxorcism code") Signed-off-by: Quentin Perret <qperret@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220705142310.3847918-1-qperret@google.com Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fbd7b564f9
commit
38715a0ccb
2 changed files with 2 additions and 2 deletions
|
|
@ -279,5 +279,5 @@ void __noreturn hyp_panic(void)
|
|||
|
||||
asmlinkage void kvm_unexpected_el2_exception(void)
|
||||
{
|
||||
return __kvm_unexpected_el2_exception();
|
||||
__kvm_unexpected_el2_exception();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -228,5 +228,5 @@ void __noreturn hyp_panic(void)
|
|||
|
||||
asmlinkage void kvm_unexpected_el2_exception(void)
|
||||
{
|
||||
return __kvm_unexpected_el2_exception();
|
||||
__kvm_unexpected_el2_exception();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue