diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2022-07-21 06:11:32 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-08-03 02:22:46 +0300 |
commit | 2198c51a08349eb176cb9789bef6f7243b8699f8 (patch) | |
tree | 20191e9ab60e17f0b3e6a39b751ccfe05cb28780 /drivers | |
parent | a20d636bee41ea67b382207bee216e70f7206752 (diff) | |
download | linux-2198c51a08349eb176cb9789bef6f7243b8699f8.tar.xz |
md: fix build failure for !MODULE
After merging the block tree, today's linux-next build (x86_64
allmodconfig) failed like this:
drivers/md/md.c:717:22: error: 'mddev_find' defined but not used [-Werror=unused-function]
717 | static struct mddev *mddev_find(dev_t unit)
| ^~~~~~~~~~
cc1: all warnings being treated as errors
Caused by commit
4500d5c17910 ("md: simplify md_open")
Make mddev_find() available only for non-modular builds.
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220721131132.070be166@canb.auug.org.au
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index fa500ae9863b..673a39042208 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -714,6 +714,7 @@ static dev_t mddev_alloc_unit(void) return dev; } +#ifndef MODULE static struct mddev *mddev_find(dev_t unit) { struct mddev *mddev; @@ -729,6 +730,7 @@ static struct mddev *mddev_find(dev_t unit) return mddev; } +#endif static struct mddev *mddev_alloc(dev_t unit) { |