summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorEmil Goode <emilgoode@gmail.com>2013-05-09 22:39:26 +0200
committerKent Overstreet <koverstreet@google.com>2013-05-15 09:42:50 +0200
commit867e1162068eb5632c829d453fd65d6089564f55 (patch)
tree6bb2cd61514923ac924a4e864e6e09c79e19cf4b /drivers/md
parentMerge branch 'bcache-for-upstream' of http://evilpiepirate.org/git/linux-bcac... (diff)
downloadlinux-867e1162068eb5632c829d453fd65d6089564f55.tar.xz
linux-867e1162068eb5632c829d453fd65d6089564f55.zip
bcache: Fix incompatible pointer type warning
The function pointer release in struct block_device_operations should point to functions declared as void. Sparse warnings: drivers/md/bcache/super.c:656:27: warning: incorrect type in initializer (different base types) drivers/md/bcache/super.c:656:27: expected void ( *release )( ... ) drivers/md/bcache/super.c:656:27: got int ( static [toplevel] *<noident> )( ... ) drivers/md/bcache/super.c:656:2: warning: initialization from incompatible pointer type [enabled by default] drivers/md/bcache/super.c:656:2: warning: (near initialization for ‘bcache_ops.release’) [enabled by default] Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Kent Overstreet <koverstreet@google.com>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/bcache/super.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index c8046bc4aa57..b09beb2b52c7 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -634,11 +634,10 @@ static int open_dev(struct block_device *b, fmode_t mode)
return 0;
}
-static int release_dev(struct gendisk *b, fmode_t mode)
+static void release_dev(struct gendisk *b, fmode_t mode)
{
struct bcache_device *d = b->private_data;
closure_put(&d->cl);
- return 0;
}
static int ioctl_dev(struct block_device *b, fmode_t mode,