summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2005-06-29 12:02:18 +0000
committerDave Airlie <airlied@linux.ie>2005-06-29 12:02:18 +0000
commit6975571c3b740e3a3813058a856fc6bd8b7fbd14 (patch)
tree79a4652e7f9bb19db1ef8989f709cfeee690e6cf /linux-core
parent62b55eb433a211c565367b8ae717666e0acaf8fe (diff)
fix some warnings from cross compiler
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/mga_ioc32.c2
-rw-r--r--linux-core/r128_ioc32.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/linux-core/mga_ioc32.c b/linux-core/mga_ioc32.c
index 390bb2e6..bc745cfa 100644
--- a/linux-core/mga_ioc32.c
+++ b/linux-core/mga_ioc32.c
@@ -122,7 +122,7 @@ static int compat_mga_getparam(struct file *file, unsigned int cmd,
getparam = compat_alloc_user_space(sizeof(*getparam));
if (!access_ok(VERIFY_WRITE, getparam, sizeof(*getparam))
|| __put_user(getparam32.param, &getparam->param)
- || __put_user(getparam32.value, &getparam->value))
+ || __put_user((void __user *)(unsigned long)getparam32.value, &getparam->value))
return -EFAULT;
return drm_ioctl(file->f_dentry->d_inode, file,
diff --git a/linux-core/r128_ioc32.c b/linux-core/r128_ioc32.c
index b34a0ce2..60598ef9 100644
--- a/linux-core/r128_ioc32.c
+++ b/linux-core/r128_ioc32.c
@@ -122,10 +122,10 @@ static int compat_r128_depth(struct file *file, unsigned int cmd,
if (!access_ok(VERIFY_WRITE, depth, sizeof(*depth))
|| __put_user(depth32.func, &depth->func)
|| __put_user(depth32.n, &depth->n)
- || __put_user(depth32.x, &depth->x)
- || __put_user(depth32.y, &depth->y)
- || __put_user(depth32.buffer, &depth->buffer)
- || __put_user(depth32.mask, &depth->mask))
+ || __put_user((int __user *)(unsigned long)depth32.x, &depth->x)
+ || __put_user((int __user *)(unsigned long)depth32.y, &depth->y)
+ || __put_user((unsigned int __user *)(unsigned long)depth32.buffer, &depth->buffer)
+ || __put_user((unsigned char __user *)(unsigned long)depth32.mask, &depth->mask))
return -EFAULT;
return drm_ioctl(file->f_dentry->d_inode, file,
@@ -148,7 +148,7 @@ static int compat_r128_stipple(struct file *file, unsigned int cmd,
stipple = compat_alloc_user_space(sizeof(*stipple));
if (!access_ok(VERIFY_WRITE, stipple, sizeof(*stipple))
- || __put_user(stipple32.mask, &stipple->mask))
+ || __put_user((unsigned int __user *)(unsigned long)stipple32.mask, &stipple->mask))
return -EFAULT;
return drm_ioctl(file->f_dentry->d_inode, file,
@@ -172,7 +172,7 @@ static int compat_r128_getparam(struct file *file, unsigned int cmd,
getparam = compat_alloc_user_space(sizeof(*getparam));
if (!access_ok(VERIFY_WRITE, getparam, sizeof(*getparam))
|| __put_user(getparam32.param, &getparam->param)
- || __put_user(getparam32.value, &getparam->value))
+ || __put_user((void __user *)(unsigned long)getparam32.value, &getparam->value))
return -EFAULT;
return drm_ioctl(file->f_dentry->d_inode, file,