[PATCH] zram: ZRAM_DEF_COMP should depend on ZRAM

Geert Uytterhoeven posted 1 patch 2 weeks, 4 days ago
drivers/block/zram/Kconfig | 1 +
1 file changed, 1 insertion(+)
[PATCH] zram: ZRAM_DEF_COMP should depend on ZRAM
Posted by Geert Uytterhoeven 2 weeks, 4 days ago
When Compressed RAM block device support is disabled, the
CONFIG_ZRAM_DEF_COMP symbol still ends up in the generated config file:

    CONFIG_ZRAM_DEF_COMP="unset-value"

While this causes no real harm, avoid polluting the config file by
adding a dependency on ZRAM.

Fixes: 917a59e81c342f47 ("zram: introduce custom comp backends API")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/block/zram/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/zram/Kconfig b/drivers/block/zram/Kconfig
index 6aea609b795c2f36..402b7b1758632807 100644
--- a/drivers/block/zram/Kconfig
+++ b/drivers/block/zram/Kconfig
@@ -94,6 +94,7 @@ endchoice
 
 config ZRAM_DEF_COMP
 	string
+	depends on ZRAM
 	default "lzo-rle" if ZRAM_DEF_COMP_LZORLE
 	default "lzo" if ZRAM_DEF_COMP_LZO
 	default "lz4" if ZRAM_DEF_COMP_LZ4
-- 
2.34.1
Re: [PATCH] zram: ZRAM_DEF_COMP should depend on ZRAM
Posted by Sergey Senozhatsky 1 week, 6 days ago
Sorry for the delay


On (24/11/05 12:50), Geert Uytterhoeven wrote:
> When Compressed RAM block device support is disabled, the
> CONFIG_ZRAM_DEF_COMP symbol still ends up in the generated config file:
> 
>     CONFIG_ZRAM_DEF_COMP="unset-value"
> 
> While this causes no real harm, avoid polluting the config file by
> adding a dependency on ZRAM.
> 
> Fixes: 917a59e81c342f47 ("zram: introduce custom comp backends API")

Sort of feels like it might be 3d711a382735d that introduced
it first, but I'm okay with Fixes 917a59e81c342f47

> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>