]> git.baikalelectronics.ru Git - kernel.git/commit
md: fix build failure for !MODULE
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Jul 2022 03:11:32 +0000 (13:11 +1000)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:22:46 +0000 (17:22 -0600)
commitee6c9c7ea6c185d4ca4b8a9aa0b12bdf50a441fb
tree20191e9ab60e17f0b3e6a39b751ccfe05cb28780
parentb0cd54c7c42bf631b7d341716ab7135b06e212e0
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>
drivers/md/md.c