Searched hist:"1 c3ace2b" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/arch/arm64/kvm/hyp/vhe/ |
H A D | switch.c | 1c3ace2b Tue Jul 05 09:23:10 CDT 2022 Quentin Perret <qperret@google.com> KVM: arm64: Don't return from void function
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: e9ee186bb735 ("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
|
/openbmc/linux/arch/arm64/kvm/hyp/nvhe/ |
H A D | switch.c | 1c3ace2b Tue Jul 05 09:23:10 CDT 2022 Quentin Perret <qperret@google.com> KVM: arm64: Don't return from void function
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: e9ee186bb735 ("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
|