diff options
author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-01-14 09:12:05 -0500 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-21 10:49:32 -0500 |
commit | d3465af60f4471b7b6201928e709bc137fdbee3e (patch) | |
tree | 561573b37805e3f82f02b2f04acc66abd962dcb3 | |
parent | 3e41ba05b6d60cd54e64639b308be62c12308a04 (diff) |
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>
-rw-r--r-- | scripts/kconfig/menu.c | 7 |
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) | |||
323 | if (menu->sym && menu->sym->type == S_UNKNOWN) | 323 | if (menu->sym && menu->sym->type == S_UNKNOWN) |
324 | menu_set_type(sym->type); | 324 | menu_set_type(sym->type); |
325 | } | 325 | } |
326 | |||
327 | /* | ||
328 | * Use the choice itself as the parent dependency of | ||
329 | * the contained items. This turns the mode of the | ||
330 | * choice into an upper bound on the visibility of the | ||
331 | * choice value symbols. | ||
332 | */ | ||
326 | parentdep = expr_alloc_symbol(sym); | 333 | parentdep = expr_alloc_symbol(sym); |
327 | } else if (parent->prompt) | 334 | } else if (parent->prompt) |
328 | parentdep = parent->prompt->visible.expr; | 335 | parentdep = parent->prompt->visible.expr; |