fix some warnings from cross compiler
authorDave Airlie <airlied@linux.ie>
Wed, 29 Jun 2005 12:02:18 +0000 (12:02 +0000)
committerDave Airlie <airlied@linux.ie>
Wed, 29 Jun 2005 12:02:18 +0000 (12:02 +0000)
linux-core/mga_ioc32.c
linux-core/r128_ioc32.c

index 390bb2e..bc745cf 100644 (file)
@@ -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, 
index b34a0ce..60598ef 100644 (file)
@@ -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,