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] <asn:1>*from got struct fstrim_range *<noident> warning: incorrect type in argument 1 (different address spaces) expected void [noderef] <asn:1>*to got struct fstrim_range *<noident> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
committed by
Theodore Ts'o
parent
e0cbee3e14
commit
e6705f7c25
@ -350,7 +350,7 @@ mext_out:
|
|||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (copy_from_user(&range, (struct fstrim_range *)arg,
|
if (copy_from_user(&range, (struct fstrim_range __user *)arg,
|
||||||
sizeof(range)))
|
sizeof(range)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
@ -360,7 +360,7 @@ mext_out:
|
|||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
if (copy_to_user((struct fstrim_range *)arg, &range,
|
if (copy_to_user((struct fstrim_range __user *)arg, &range,
|
||||||
sizeof(range)))
|
sizeof(range)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user