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
Jiri Slaby 2007-11-29 09:55:38 +10:00 committed by Dave Airlie
parent 32c9a109b1
commit 309b2c4c05
1 changed files with 2 additions and 2 deletions

View File

@ -918,7 +918,7 @@ int i915_validate_buffer_list(struct drm_file *file_priv,
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;
goto out_err;
}
@ -969,7 +969,7 @@ int i915_validate_buffer_list(struct drm_file *file_priv,
arg.handled = 1;
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;
data = next;