OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7cb79f4
)
KVM: SVM: remove redundant ret variable
author
zhang songyi
<zhang.songyi@zte.com.cn>
Mon, 28 Nov 2022 12:03:38 +0000
(20:03 +0800)
committer
Sean Christopherson
<seanjc@google.com>
Tue, 24 Jan 2023 18:06:47 +0000
(10:06 -0800)
Return value from svm_nmi_blocked() directly instead of taking
this in another redundant variable.
Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
Link:
https://lore.kernel.org/r/202211282003389362484@zte.com.cn
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/svm/svm.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/svm/svm.c
b/arch/x86/kvm/svm/svm.c
index
d13cf53
..
f5fd44f
100644
(file)
--- a/
arch/x86/kvm/svm/svm.c
+++ b/
arch/x86/kvm/svm/svm.c
@@
-3583,7
+3583,6
@@
bool svm_nmi_blocked(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
struct vmcb *vmcb = svm->vmcb;
- bool ret;
if (!gif_set(svm))
return true;
@@
-3591,10
+3590,8
@@
bool svm_nmi_blocked(struct kvm_vcpu *vcpu)
if (is_guest_mode(vcpu) && nested_exit_on_nmi(svm))
return false;
- ret = (vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) ||
- (vcpu->arch.hflags & HF_NMI_MASK);
-
- return ret;
+ return (vmcb->control.int_state & SVM_INTERRUPT_SHADOW_MASK) ||
+ (vcpu->arch.hflags & HF_NMI_MASK);
}
static int svm_nmi_allowed(struct kvm_vcpu *vcpu, bool for_injection)