2023-04-15 13:23:51

by Akinobu Mita

[permalink] [raw]
Subject: [PATCH -block] fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m

This fixes a build error when CONFIG_FAULT_INJECTION_CONFIGFS=y and
CONFIG_CONFIGFS_FS=m.

Since the fault-injection library cannot built as a module, avoid building
configfs as a module.

Reported-by: kernel test robot <[email protected]>
Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Signed-off-by: Akinobu Mita <[email protected]>
---
lib/Kconfig.debug | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 6f64b49a2a8e..ce51d4dc6803 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1979,7 +1979,8 @@ config FAIL_SUNRPC

config FAULT_INJECTION_CONFIGFS
bool "Configfs interface for fault-injection capabilities"
- depends on FAULT_INJECTION && CONFIGFS_FS
+ depends on FAULT_INJECTION
+ select CONFIGFS_FS
help
This option allows configfs-based drivers to dynamically configure
fault-injection via configfs. Each parameter for driver-specific
--
2.34.1


2023-04-15 20:41:36

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH -block] fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m


On Sat, 15 Apr 2023 21:57:05 +0900, Akinobu Mita wrote:
> This fixes a build error when CONFIG_FAULT_INJECTION_CONFIGFS=y and
> CONFIG_CONFIGFS_FS=m.
>
> Since the fault-injection library cannot built as a module, avoid building
> configfs as a module.
>
>
> [...]

Applied, thanks!

[1/1] fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m
commit: 5347c9321845e5a94be19ea951746d4f2b8b194f

Best regards,
--
Jens Axboe



2023-04-16 09:54:55

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH -block] fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m

Hi Mita-san,

On Sat, Apr 15, 2023 at 3:09 PM Akinobu Mita <[email protected]> wrote:
> This fixes a build error when CONFIG_FAULT_INJECTION_CONFIGFS=y and
> CONFIG_CONFIGFS_FS=m.
>
> Since the fault-injection library cannot built as a module, avoid building
> configfs as a module.
>
> Reported-by: kernel test robot <[email protected]>
> Link: https://lore.kernel.org/oe-kbuild-all/[email protected]/
> Signed-off-by: Akinobu Mita <[email protected]>

Thanks for your patch!

> --- a/lib/Kconfig.debug
> +++ b/lib/Kconfig.debug
> @@ -1979,7 +1979,8 @@ config FAIL_SUNRPC
>
> config FAULT_INJECTION_CONFIGFS
> bool "Configfs interface for fault-injection capabilities"
> - depends on FAULT_INJECTION && CONFIGFS_FS
> + depends on FAULT_INJECTION
> + select CONFIGFS_FS

My first thought was "please do not select CONFIGFS_FS", but
apparently this is what most users do, so I guess it's OK.

Reviewed-by: Geert Uytterhoeven <[email protected]>

The alternative would be to do:

- depends on FAULT_INJECTION && CONFIGFS_FS
+ depends on FAULT_INJECTION && (CONFIGFS_FS=y ||
CONFIGFS_FS=FAULT_INJECTION)

> help
> This option allows configfs-based drivers to dynamically configure
> fault-injection via configfs. Each parameter for driver-specific

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

2023-04-16 11:18:02

by Arnd Bergmann

[permalink] [raw]
Subject: Re: [PATCH -block] fault-inject: fix build error when FAULT_INJECTION_CONFIGFS=y and CONFIGFS_FS=m

On Sun, Apr 16, 2023, at 11:53, Geert Uytterhoeven wrote:
>
> - depends on FAULT_INJECTION && CONFIGFS_FS
> + depends on FAULT_INJECTION && (CONFIGFS_FS=y ||
> CONFIGFS_FS=FAULT_INJECTION)

FAULT_INJECTION is a bool symbol, so the last part is not
needed here.

Arnd