* [PATCH kvm-next] selftests/kvm: remove unneeded variable
@ 2021-12-10 2:27 cgel.zte
2021-12-10 18:47 ` Sean Christopherson
0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2021-12-10 2:27 UTC (permalink / raw)
To: pbonzini
Cc: shuah, seanjc, vkuznets, ricarkol, maz, aaronlewis, like.xu,
dmatlack, kvm, linux-kselftest, linux-kernel, Minghao Chi,
Zeal Robot
From: Minghao Chi <chi.minghao@zte.com.cn>
Return status directly from function called.
Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
tools/testing/selftests/kvm/lib/x86_64/processor.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/tools/testing/selftests/kvm/lib/x86_64/processor.c b/tools/testing/selftests/kvm/lib/x86_64/processor.c
index 82c39db91369..80ab802aa8f8 100644
--- a/tools/testing/selftests/kvm/lib/x86_64/processor.c
+++ b/tools/testing/selftests/kvm/lib/x86_64/processor.c
@@ -931,15 +931,13 @@ int _vcpu_set_msr(struct kvm_vm *vm, uint32_t vcpuid, uint64_t msr_index,
struct kvm_msrs header;
struct kvm_msr_entry entry;
} buffer = {};
- int r;
TEST_ASSERT(vcpu != NULL, "vcpu not found, vcpuid: %u", vcpuid);
memset(&buffer, 0, sizeof(buffer));
buffer.header.nmsrs = 1;
buffer.entry.index = msr_index;
buffer.entry.data = msr_value;
- r = ioctl(vcpu->fd, KVM_SET_MSRS, &buffer.header);
- return r;
+ return ioctl(vcpu->fd, KVM_SET_MSRS, &buffer.header);
}
/*
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH kvm-next] selftests/kvm: remove unneeded variable
2021-12-10 2:27 [PATCH kvm-next] selftests/kvm: remove unneeded variable cgel.zte
@ 2021-12-10 18:47 ` Sean Christopherson
0 siblings, 0 replies; 2+ messages in thread
From: Sean Christopherson @ 2021-12-10 18:47 UTC (permalink / raw)
To: cgel.zte
Cc: pbonzini, shuah, vkuznets, ricarkol, maz, aaronlewis, like.xu,
dmatlack, kvm, linux-kselftest, linux-kernel, Minghao Chi,
Zeal Robot
On Fri, Dec 10, 2021, cgel.zte@gmail.com wrote:
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Return status directly from function called.
>
> Reported-by: Zeal Robot <zealci@zte.com.cm>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
Reviewed-by: Sean Christopherson <seanjc@google.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-10 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-10 2:27 [PATCH kvm-next] selftests/kvm: remove unneeded variable cgel.zte
2021-12-10 18:47 ` Sean Christopherson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).