From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH 2/3] KVM: VMX: Use size_t to store sizeof() values Date: Thu, 27 Jun 2013 15:36:19 +0200 Message-ID: <51CC3FD3.9090100@redhat.com> References: <1372271783-18732-1-git-send-email-minipli@googlemail.com> <1372271783-18732-3-git-send-email-minipli@googlemail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm@vger.kernel.org To: Mathias Krause Return-path: Received: from mx1.redhat.com ([209.132.183.28]:18095 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752165Ab3F0Ng1 (ORCPT ); Thu, 27 Jun 2013 09:36:27 -0400 In-Reply-To: <1372271783-18732-3-git-send-email-minipli@googlemail.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 26/06/2013 20:36, Mathias Krause ha scritto: > The type for storing values of the sizeof operator should be size_t. > No semantical changes, only type correctness. > > Signed-off-by: Mathias Krause > --- > arch/x86/kvm/vmx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 7393164..cd9090f 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -3909,7 +3909,7 @@ static void free_vpid(struct vcpu_vmx *vmx) > static void __vmx_disable_intercept_for_msr(unsigned long *msr_bitmap, > u32 msr, int type) > { > - int f = sizeof(unsigned long); > + const size_t f = sizeof(unsigned long); > > if (!cpu_has_vmx_msr_bitmap()) > return; > @@ -3944,7 +3944,7 @@ static void __vmx_disable_intercept_for_msr(unsigned long *msr_bitmap, > static void __vmx_enable_intercept_for_msr(unsigned long *msr_bitmap, > u32 msr, int type) > { > - int f = sizeof(unsigned long); > + const size_t f = sizeof(unsigned long); > > if (!cpu_has_vmx_msr_bitmap()) > return; > Both the "const" and the change seem like useless churn. It is only used to adjust a pointer by a given number of bytes. Paolo