From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754109AbbGANhW (ORCPT ); Wed, 1 Jul 2015 09:37:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54936 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889AbbGANhS (ORCPT ); Wed, 1 Jul 2015 09:37:18 -0400 Subject: Re: [PATCH] KVM: x86: remove data variable from kvm_get_msr_common To: Nicolas Iooss , Gleb Natapov References: <1435574363-3114-1-git-send-email-nicolas.iooss_linux@m4x.org> Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org From: Paolo Bonzini Message-ID: <5593ED0A.6070403@redhat.com> Date: Wed, 1 Jul 2015 15:37:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 MIME-Version: 1.0 In-Reply-To: <1435574363-3114-1-git-send-email-nicolas.iooss_linux@m4x.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/06/2015 12:39, Nicolas Iooss wrote: > Commit 609e36d372ad ("KVM: x86: pass host_initiated to functions that > read MSRs") modified kvm_get_msr_common function to use msr_info->data > instead of data but missed one occurrence. Replace it and remove the > unused local variable. > > Fixes: 609e36d372ad ("KVM: x86: pass host_initiated to functions that > read MSRs") > Signed-off-by: Nicolas Iooss > --- > arch/x86/kvm/x86.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c > index ac165c2fb8e5..bbaf44e8f0d3 100644 > --- a/arch/x86/kvm/x86.c > +++ b/arch/x86/kvm/x86.c > @@ -2379,8 +2379,6 @@ static int get_msr_hyperv(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) > > int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) > { > - u64 data; > - > switch (msr_info->index) { > case MSR_IA32_PLATFORM_ID: > case MSR_IA32_EBL_CR_POWERON: > @@ -2453,7 +2451,7 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info) > /* TSC increment by tick */ > msr_info->data = 1000ULL; > /* CPU multiplier */ > - data |= (((uint64_t)4ULL) << 40); > + msr_info->data |= (((uint64_t)4ULL) << 40); > break; > case MSR_EFER: > msr_info->data = vcpu->arch.efer; > Applied, thanks. Paolo