Skip to contentSkip to conversation

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

PATCH Stephen Rothwell 3 participants 3 messages Jul 21, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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 <[email protected]>
Date: Thu, 21 Jul 2022 13:03:16 +1000
Subject: [PATCH] fix for "md: simplify md_open"

---
 drivers/md/md.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/md/md.c +2 -0
index fa500ae9863b..673a39042208 100644
@@ -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)
 {
Signature · 4 lines
2.35.1
-- 
Cheers,
Stephen Rothwell
#2 lore raw
In reply to Stephen Rothwell
Quoted 7 lines · Stephen Rothwell

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)

Quoted 8 lines
      |                      ^~~~~~~~~~

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.

Signature · 1 line
Jens Axboe