Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH] btrfs/ioctl.c: quiet sparse warnings
@ 2011-09-23 18:07 H Hartley Sweeten
  2011-09-23 18:15 ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: H Hartley Sweeten @ 2011-09-23 18:07 UTC (permalink / raw)
  To: Linux Kernel; +Cc: linux-btrfs, chris.mason

Quiet the following sparse warnings:

warning: cast removes address space of expression
warning: incorrect type in assignment (different address spaces)
   expected struct btrfs_ioctl_space_info [noderef] <asn:1>*user_dest
   got struct btrfs_ioctl_space_info *<noident>
warning: symbol 'btrfs_ioctl_space_info' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Chris Mason <chris.mason@oracle.com>

---

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 970977a..a001af4 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -2599,7 +2599,7 @@ static void get_block_group_info(struct list_head *groups_list,
 	}
 }
 
-long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
+static long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
 {
 	struct btrfs_ioctl_space_args space_args;
 	struct btrfs_ioctl_space_info space;
@@ -2705,7 +2705,7 @@ long btrfs_ioctl_space_info(struct btrfs_root *root, void __user *arg)
 		up_read(&info->groups_sem);
 	}
 
-	user_dest = (struct btrfs_ioctl_space_info *)
+	user_dest = (struct btrfs_ioctl_space_info __user *)
 		(arg + sizeof(struct btrfs_ioctl_space_args));
 
 	if (copy_to_user(user_dest, dest_orig, alloc_size))

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-23 19:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-23 18:07 [PATCH] btrfs/ioctl.c: quiet sparse warnings H Hartley Sweeten
2011-09-23 18:15 ` Joe Perches
2011-09-23 19:02   ` H Hartley Sweeten

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox