aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2014-09-28 20:46:22 -0400
committerDave Chinner <david@fromorbit.com>2014-09-28 20:46:22 -0400
commitb972d0797180d8414351d9dc8ff65071c692d058 (patch)
tree5152c41bd107c7401dcd5bb58fb5df1723801c2a /fs
parente3aed1a08190c038c4ea41b73ea6f07bc0e3290c (diff)
xfs: annotate user variables passed as void
Some argument callbacks can contain user buffers, and sparse warns about passing them as void pointers. Cast appropriately to remove the sparse warnings. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_ioctl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 3799695b9249..7a6b406ce6c9 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1349,7 +1349,7 @@ xfs_ioc_setxflags(
1349STATIC int 1349STATIC int
1350xfs_getbmap_format(void **ap, struct getbmapx *bmv, int *full) 1350xfs_getbmap_format(void **ap, struct getbmapx *bmv, int *full)
1351{ 1351{
1352 struct getbmap __user *base = *ap; 1352 struct getbmap __user *base = (struct getbmap __user *)*ap;
1353 1353
1354 /* copy only getbmap portion (not getbmapx) */ 1354 /* copy only getbmap portion (not getbmapx) */
1355 if (copy_to_user(base, bmv, sizeof(struct getbmap))) 1355 if (copy_to_user(base, bmv, sizeof(struct getbmap)))
@@ -1380,7 +1380,7 @@ xfs_ioc_getbmap(
1380 bmx.bmv_iflags |= BMV_IF_NO_DMAPI_READ; 1380 bmx.bmv_iflags |= BMV_IF_NO_DMAPI_READ;
1381 1381
1382 error = xfs_getbmap(ip, &bmx, xfs_getbmap_format, 1382 error = xfs_getbmap(ip, &bmx, xfs_getbmap_format,
1383 (struct getbmap *)arg+1); 1383 (__force struct getbmap *)arg+1);
1384 if (error) 1384 if (error)
1385 return error; 1385 return error;
1386 1386
@@ -1393,7 +1393,7 @@ xfs_ioc_getbmap(
1393STATIC int 1393STATIC int
1394xfs_getbmapx_format(void **ap, struct getbmapx *bmv, int *full) 1394xfs_getbmapx_format(void **ap, struct getbmapx *bmv, int *full)
1395{ 1395{
1396 struct getbmapx __user *base = *ap; 1396 struct getbmapx __user *base = (struct getbmapx __user *)*ap;
1397 1397
1398 if (copy_to_user(base, bmv, sizeof(struct getbmapx))) 1398 if (copy_to_user(base, bmv, sizeof(struct getbmapx)))
1399 return -EFAULT; 1399 return -EFAULT;
@@ -1420,7 +1420,7 @@ xfs_ioc_getbmapx(
1420 return -EINVAL; 1420 return -EINVAL;
1421 1421
1422 error = xfs_getbmap(ip, &bmx, xfs_getbmapx_format, 1422 error = xfs_getbmap(ip, &bmx, xfs_getbmapx_format,
1423 (struct getbmapx *)arg+1); 1423 (__force struct getbmapx *)arg+1);
1424 if (error) 1424 if (error)
1425 return error; 1425 return error;
1426 1426