Beside the emitted warning, the added cast (u64 -> unsigned) strips out
part of address on 64 bit. Cast to unsigned long instead. Signed-off-by: Jiri Slaby <jirislaby@gmail.com>main
parent
32c9a109b1
commit
309b2c4c05
|
@ -918,7 +918,7 @@ int i915_validate_buffer_list(struct drm_file *file_priv,
|
||||||
|
|
||||||
buffers[buf_count] = NULL;
|
buffers[buf_count] = NULL;
|
||||||
|
|
||||||
if (copy_from_user(&arg, (void __user *)(unsigned)data, sizeof(arg))) {
|
if (copy_from_user(&arg, (void __user *)(unsigned long)data, sizeof(arg))) {
|
||||||
ret = -EFAULT;
|
ret = -EFAULT;
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
}
|
||||||
|
@ -969,7 +969,7 @@ int i915_validate_buffer_list(struct drm_file *file_priv,
|
||||||
arg.handled = 1;
|
arg.handled = 1;
|
||||||
arg.d.rep = rep;
|
arg.d.rep = rep;
|
||||||
|
|
||||||
if (copy_to_user((void __user *)(unsigned)data, &arg, sizeof(arg)))
|
if (copy_to_user((void __user *)(unsigned long)data, &arg, sizeof(arg)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
data = next;
|
data = next;
|
||||||
|
|
Loading…
Reference in New Issue