From 82b30c13e001113c9df51fcbfbde94bce1183d29 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 14 Jan 2018 15:12:05 +0100 Subject: [PATCH] kconfig: Clarify choice dependency propagation It's easy to miss that choices are special-cased to pass on their mode as the parent dependency. No functional changes. Only comments added. Signed-off-by: Ulf Magnusson Signed-off-by: Masahiro Yamada Signed-off-by: Christian Lamparter --- config/menu.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/config/menu.c b/config/menu.c index 7634d56..dcf2200 100644 --- a/config/menu.c +++ b/config/menu.c @@ -323,6 +323,13 @@ void menu_finalize(struct menu *parent) if (menu->sym && menu->sym->type == S_UNKNOWN) menu_set_type(sym->type); } + + /* + * Use the choice itself as the parent dependency of + * the contained items. This turns the mode of the + * choice into an upper bound on the visibility of the + * choice value symbols. + */ parentdep = expr_alloc_symbol(sym); } else if (parent->prompt) parentdep = parent->prompt->visible.expr; -- 2.31.1