Re: [PATCH] mm/kconfig: Drop redundant dependency wrappers

From: Lorenzo Stoakes (ARM)

Date: Tue Jul 14 2026 - 10:31:18 EST


On Sun, 12 Jul 2026 17:33:26 +0800, Kaitao Cheng <kaitao.cheng@xxxxxxxxx> wrote:
> [...]
>
> This keeps the same visibility and defaults while avoiding duplicate
> dependency expressions.
>
> Suggested-by: Julian Braha <julianbraha@xxxxxxxxx>
> Signed-off-by: Kaitao Cheng <chengkaitao@xxxxxxxxxx>

LGTM!

>
>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index 4efff892820d..eaff45c9f7b7 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -591,12 +587,10 @@ endchoice
> config MEMORY_HOTREMOVE
> bool "Allow for memory hot remove"
> select HAVE_BOOTMEM_INFO_NODE if X86_64
> - depends on MEMORY_HOTPLUG
> select MIGRATION
>
> config MHP_MEMMAP_ON_MEMORY
> def_bool y
> - depends on MEMORY_HOTPLUG

Honestly I hate that we have both if and depends on, I'd rather we just had
depends on so we had consistency everywhere :) but it's not your fault, just a
gripe with Kconfig in general! :)

> @@ -1391,17 +1385,15 @@ menuconfig USERFAULTFD
> [ ... skip 12 lines ... ]
> purposes. It is required to enable userfaultfd write protection on
> file-backed memory types like shmem and hugetlbfs.
> -endif # USERFAULTFD
>
> # multi-gen LRU {
> config LRU_GEN

Cheers, Lorenzo

Reviewed-by: Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>

--
Lorenzo Stoakes (ARM) <ljs@xxxxxxxxxx>