From: H Hartley Sweeten Date: Tue, 18 Oct 2011 14:59:51 +0000 (-0400) Subject: ext4: add __user decoration to calls of copy_{from,to}_user() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e6705f7c255d1ffae7cd161d0b657296f4dd62fd;p=openwrt%2Fstaging%2Fblogic.git ext4: add __user decoration to calls of copy_{from,to}_user() This quiets the sparse noise: warning: incorrect type in argument 2 (different address spaces) expected void const [noderef] *from got struct fstrim_range * warning: incorrect type in argument 1 (different address spaces) expected void [noderef] *to got struct fstrim_range * Signed-off-by: H Hartley Sweeten Signed-off-by: "Theodore Ts'o" --- diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 8f7ea6905421..a56796814d6a 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c @@ -350,7 +350,7 @@ mext_out: return -EOPNOTSUPP; } - if (copy_from_user(&range, (struct fstrim_range *)arg, + if (copy_from_user(&range, (struct fstrim_range __user *)arg, sizeof(range))) return -EFAULT; @@ -360,7 +360,7 @@ mext_out: if (ret < 0) return ret; - if (copy_to_user((struct fstrim_range *)arg, &range, + if (copy_to_user((struct fstrim_range __user *)arg, &range, sizeof(range))) return -EFAULT;