Re: [PATCH 1/3] KVM: VMX: Use proper types to access const arrays

2013-06-27 Thread Paolo Bonzini
Il 26/06/2013 20:36, Mathias Krause ha scritto: Use a const pointer type instead of casting away the const qualifier from const arrays. Keep the pointer array on the stack, nonetheless. Making it static just increases the object size. Signed-off-by: Mathias Krause mini...@googlemail.com ---

Re: [PATCH 1/3] KVM: VMX: Use proper types to access const arrays

2013-06-27 Thread Mathias Krause
On 27 June 2013 15:33, Paolo Bonzini pbonz...@redhat.com wrote: Il 26/06/2013 20:36, Mathias Krause ha scritto: Use a const pointer type instead of casting away the const qualifier from const arrays. Keep the pointer array on the stack, nonetheless. Making it static just increases the object

Re: [PATCH 1/3] KVM: VMX: Use proper types to access const arrays

2013-06-27 Thread Paolo Bonzini
Il 27/06/2013 15:42, Mathias Krause ha scritto: The const int is not particularly useful, but doesn't hurt either. It's more of a hint for the compiler to take the values verbatim instead of allocating stack space for them. But it'll probably already do it even without that hint. It won't

[PATCH 1/3] KVM: VMX: Use proper types to access const arrays

2013-06-26 Thread Mathias Krause
Use a const pointer type instead of casting away the const qualifier from const arrays. Keep the pointer array on the stack, nonetheless. Making it static just increases the object size. Signed-off-by: Mathias Krause mini...@googlemail.com --- arch/x86/kvm/vmx.c | 15 +++ 1 file