• Paul Bolle's avatar
    kvm: vfio: silence GCC warning · e81d1ad3
    Paul Bolle authored
    Building vfio.o triggers a GCC warning (when building for 32 bits x86):
        arch/x86/kvm/../../../virt/kvm/vfio.c: In function 'kvm_vfio_set_group':
        arch/x86/kvm/../../../virt/kvm/vfio.c:104:22: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
          void __user *argp = (void __user *)arg;
                              ^
    
    Silence this warning by casting arg to unsigned long.
    
    argp's current type, "void __user *", is always casted to "int32_t
    __user *". So its type might as well be changed to "int32_t __user *".
    Signed-off-by: default avatarPaul Bolle <pebolle@tiscali.nl>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    e81d1ad3
vfio.c 5.51 KB