diff options
author | Jiang Biao <jiang.biao2@zte.com.cn> | 2016-11-06 19:57:16 -0500 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2016-11-16 16:09:44 -0500 |
commit | 695151964d3f9a4370985f17b05f57e7caaa6e3a (patch) | |
tree | 75dfba5f5fecf5efeeca811b3a79c0d3e58723a6 | |
parent | ecd8a8c2b406c5cc9e1e39a7194eb5da4b110c5d (diff) |
kvm: x86: remove unused but set variable
The local variable *gpa_offset* is set but not used afterwards,
which make the compiler issue a warning with option
-Wunused-but-set-variable. Remove it to avoid the warning.
Signed-off-by: Jiang Biao <jiang.biao2@zte.com.cn>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r-- | arch/x86/kvm/x86.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 7eb099222c50..792980f6e123 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -2162,7 +2162,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) | |||
2162 | break; | 2162 | break; |
2163 | case MSR_KVM_SYSTEM_TIME_NEW: | 2163 | case MSR_KVM_SYSTEM_TIME_NEW: |
2164 | case MSR_KVM_SYSTEM_TIME: { | 2164 | case MSR_KVM_SYSTEM_TIME: { |
2165 | u64 gpa_offset; | ||
2166 | struct kvm_arch *ka = &vcpu->kvm->arch; | 2165 | struct kvm_arch *ka = &vcpu->kvm->arch; |
2167 | 2166 | ||
2168 | kvmclock_reset(vcpu); | 2167 | kvmclock_reset(vcpu); |
@@ -2184,8 +2183,6 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) | |||
2184 | if (!(data & 1)) | 2183 | if (!(data & 1)) |
2185 | break; | 2184 | break; |
2186 | 2185 | ||
2187 | gpa_offset = data & ~(PAGE_MASK | 1); | ||
2188 | |||
2189 | if (kvm_gfn_to_hva_cache_init(vcpu->kvm, | 2186 | if (kvm_gfn_to_hva_cache_init(vcpu->kvm, |
2190 | &vcpu->arch.pv_time, data & ~1ULL, | 2187 | &vcpu->arch.pv_time, data & ~1ULL, |
2191 | sizeof(struct pvclock_vcpu_time_info))) | 2188 | sizeof(struct pvclock_vcpu_time_info))) |