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 <mini...@googlemail.com>
> ---
>  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
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to