* [PATCH] bcache: Fix incompatible pointer type warning
@ 2013-05-09 20:39 Emil Goode
2013-05-09 20:57 ` Kent Overstreet
0 siblings, 1 reply; 2+ messages in thread
From: Emil Goode @ 2013-05-09 20:39 UTC (permalink / raw)
To: koverstreet, neilb
Cc: linux-bcache, linux-raid, linux-kernel, kernel-janitors,
Emil Goode
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>
---
drivers/md/bcache/super.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 76c7f6c..938bbff 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -637,11 +637,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,
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] bcache: Fix incompatible pointer type warning
2013-05-09 20:39 [PATCH] bcache: Fix incompatible pointer type warning Emil Goode
@ 2013-05-09 20:57 ` Kent Overstreet
0 siblings, 0 replies; 2+ messages in thread
From: Kent Overstreet @ 2013-05-09 20:57 UTC (permalink / raw)
To: Emil Goode; +Cc: neilb, linux-bcache, linux-raid, linux-kernel, kernel-janitors
On Thu, May 09, 2013 at 10:39:26PM +0200, Emil Goode wrote:
> The function pointer release in struct block_device_operations
> should point to functions declared as void.
Looks like .release just changed to returning void in the merge window -
thanks, applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-05-09 20:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-09 20:39 [PATCH] bcache: Fix incompatible pointer type warning Emil Goode
2013-05-09 20:57 ` Kent Overstreet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).