diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2007-11-29 09:55:38 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-11-29 09:55:38 +1000 |
commit | 309b2c4c05d02a7e7311a9491b74044f6c7f06a4 (patch) | |
tree | f8f00a106d28df8ccf946e865ca88e66eaa46bf9 /shared-core | |
parent | 32c9a109b10c087f63964b4b055603feee522cc0 (diff) |
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>
Diffstat (limited to 'shared-core')
-rw-r--r-- | shared-core/i915_dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shared-core/i915_dma.c b/shared-core/i915_dma.c index c7d563fe..f14b9b07 100644 --- a/shared-core/i915_dma.c +++ b/shared-core/i915_dma.c @@ -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; |