diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2012-11-10 16:55:56 +0100 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2013-01-24 16:21:28 +0100 |
commit | fb05f41f5f96f7423c53da4d87913fb44fd0565d (patch) | |
tree | d3cad72fea5e2b58b8bfa65aa3568e3617507234 /fs/fuse/cuse.c | |
parent | fuse: optimize __fuse_direct_io() (diff) | |
download | linux-fb05f41f5f96f7423c53da4d87913fb44fd0565d.tar.xz linux-fb05f41f5f96f7423c53da4d87913fb44fd0565d.zip |
fuse: cleanup fuse_direct_io()
Fix the following sparse warnings:
fs/fuse/file.c:1216:43: warning: cast removes address space of expression
fs/fuse/file.c:1216:43: warning: incorrect type in initializer (different address spaces)
fs/fuse/file.c:1216:43: expected void [noderef] <asn:1>*iov_base
fs/fuse/file.c:1216:43: got void *<noident>
fs/fuse/file.c:1241:43: warning: cast removes address space of expression
fs/fuse/file.c:1241:43: warning: incorrect type in initializer (different address spaces)
fs/fuse/file.c:1241:43: expected void [noderef] <asn:1>*iov_base
fs/fuse/file.c:1241:43: got void *<noident>
fs/fuse/file.c:1267:43: warning: cast removes address space of expression
fs/fuse/file.c:1267:43: warning: incorrect type in initializer (different address spaces)
fs/fuse/file.c:1267:43: expected void [noderef] <asn:1>*iov_base
fs/fuse/file.c:1267:43: got void *<noident>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Diffstat (limited to 'fs/fuse/cuse.c')
-rw-r--r-- | fs/fuse/cuse.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index fb9dcfdf040b..6f96a8def147 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c @@ -91,19 +91,22 @@ static ssize_t cuse_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { loff_t pos = 0; + struct iovec iov = { .iov_base = buf, .iov_len = count }; - return fuse_direct_io(file, buf, count, &pos, 0); + return fuse_direct_io(file, &iov, 1, count, &pos, 0); } static ssize_t cuse_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { loff_t pos = 0; + struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = count }; + /* * No locking or generic_write_checks(), the server is * responsible for locking and sanity checks. */ - return fuse_direct_io(file, buf, count, &pos, 1); + return fuse_direct_io(file, &iov, 1, count, &pos, 1); } static int cuse_open(struct inode *inode, struct file *file) |