linux-next: build failure after merge of the block tree

Stephen Rothwell posted 1 patch 3 years, 9 months ago
There is a newer version of this series
drivers/md/md.c | 2 ++
1 file changed, 2 insertions(+)
linux-next: build failure after merge of the block tree
Posted by Stephen Rothwell 3 years, 9 months ago
Hi all,

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")

I have applied the following patch for today.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 21 Jul 2022 13:03:16 +1000
Subject: [PATCH] fix for "md: simplify md_open"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 drivers/md/md.c | 2 ++
 1 file changed, 2 insertions(+)

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)
 {
-- 
2.35.1
-- 
Cheers,
Stephen Rothwell
Re: linux-next: build failure after merge of the block tree
Posted by Jens Axboe 3 years, 9 months ago
On 7/20/22 9:11 PM, Stephen Rothwell wrote:
> Hi all,
> 
> 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")
> 
> I have applied the following patch for today.

Thanks, I turned that commit message into a real patch and added it.

-- 
Jens Axboe
Re: linux-next: build failure after merge of the block tree
Posted by Christoph Hellwig 3 years, 9 months ago
On Thu, Jul 21, 2022 at 01:11:32PM +1000, Stephen Rothwell wrote:
> I have applied the following patch for today.

Thanks, the fixup does look god to me:

Reviewed-by: Christoph Hellwig <hch@lst.de>