[PATCH 3.12 77/78] KVM: x86: removing unused variable
From: Jiri Slaby
Date: Fri Apr 22 2016 - 07:08:38 EST
- Next message: Will Deacon: "Re: [RFC][PATCH 05/31] locking,arm64: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()"
- Previous message: Jiri Slaby: "[PATCH 3.12 76/78] EVM: Use crypto_memneq() for digest comparisons"
- In reply to: Jiri Slaby: "[PATCH 3.12 76/78] EVM: Use crypto_memneq() for digest comparisons"
- Next in thread: Jiri Slaby: "[PATCH 3.12 71/78] USB: usbip: fix potential out-of-bounds write"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
From: Saurabh Sengar <saurabh.truth@xxxxxxxxx>
3.12-stable review patch. If anyone has any objections, please let me know.
===============
commit 2da29bccc5045ea10c70cb3a69be777768fd0b66 upstream.
removing unused variables, found by coccinelle
Signed-off-by: Saurabh Sengar <saurabh.truth@xxxxxxxxx>
Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
---
arch/x86/kvm/x86.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index c47a4ecb584c..1962a3999adf 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3471,41 +3471,35 @@ static int kvm_vm_ioctl_set_irqchip(struct kvm *kvm, struct kvm_irqchip *chip)
static int kvm_vm_ioctl_get_pit(struct kvm *kvm, struct kvm_pit_state *ps)
{
- int r = 0;
-
mutex_lock(&kvm->arch.vpit->pit_state.lock);
memcpy(ps, &kvm->arch.vpit->pit_state, sizeof(struct kvm_pit_state));
mutex_unlock(&kvm->arch.vpit->pit_state.lock);
- return r;
+ return 0;
}
static int kvm_vm_ioctl_set_pit(struct kvm *kvm, struct kvm_pit_state *ps)
{
- int r = 0;
-
mutex_lock(&kvm->arch.vpit->pit_state.lock);
memcpy(&kvm->arch.vpit->pit_state, ps, sizeof(struct kvm_pit_state));
kvm_pit_load_count(kvm, 0, ps->channels[0].count, 0);
mutex_unlock(&kvm->arch.vpit->pit_state.lock);
- return r;
+ return 0;
}
static int kvm_vm_ioctl_get_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)
{
- int r = 0;
-
mutex_lock(&kvm->arch.vpit->pit_state.lock);
memcpy(ps->channels, &kvm->arch.vpit->pit_state.channels,
sizeof(ps->channels));
ps->flags = kvm->arch.vpit->pit_state.flags;
mutex_unlock(&kvm->arch.vpit->pit_state.lock);
memset(&ps->reserved, 0, sizeof(ps->reserved));
- return r;
+ return 0;
}
static int kvm_vm_ioctl_set_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)
{
- int r = 0, start = 0;
+ int start = 0;
u32 prev_legacy, cur_legacy;
mutex_lock(&kvm->arch.vpit->pit_state.lock);
prev_legacy = kvm->arch.vpit->pit_state.flags & KVM_PIT_FLAGS_HPET_LEGACY;
@@ -3517,7 +3511,7 @@ static int kvm_vm_ioctl_set_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)
kvm->arch.vpit->pit_state.flags = ps->flags;
kvm_pit_load_count(kvm, 0, kvm->arch.vpit->pit_state.channels[0].count, start);
mutex_unlock(&kvm->arch.vpit->pit_state.lock);
- return r;
+ return 0;
}
static int kvm_vm_ioctl_reinject(struct kvm *kvm,
--
2.8.1
- Next message: Will Deacon: "Re: [RFC][PATCH 05/31] locking,arm64: Implement atomic{,64}_fetch_{add,sub,and,andnot,or,xor}{,_relaxed,_acquire,_release}()"
- Previous message: Jiri Slaby: "[PATCH 3.12 76/78] EVM: Use crypto_memneq() for digest comparisons"
- In reply to: Jiri Slaby: "[PATCH 3.12 76/78] EVM: Use crypto_memneq() for digest comparisons"
- Next in thread: Jiri Slaby: "[PATCH 3.12 71/78] USB: usbip: fix potential out-of-bounds write"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]