summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-01-14 15:12:05 +0100
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-01-22 00:49:32 +0900
commitd3465af60f4471b7b6201928e709bc137fdbee3e (patch)
tree561573b37805e3f82f02b2f04acc66abd962dcb3 /scripts
parent3e41ba05b6d60cd54e64639b308be62c12308a04 (diff)
downloadlinux-d3465af60f4471b7b6201928e709bc137fdbee3e.tar.gz
linux-d3465af60f4471b7b6201928e709bc137fdbee3e.tar.bz2
linux-d3465af60f4471b7b6201928e709bc137fdbee3e.zip
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 <ulfalizer@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/menu.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 7634d567e779..dcf22008b2d6 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/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;