From: Ulf Magnusson Date: Sun, 14 Jan 2018 14:12:05 +0000 (+0100) Subject: kconfig: Clarify choice dependency propagation X-Git-Tag: v4.16-rc1~105^2~6 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=d3465af60f4471b7b6201928e709bc137fdbee3e;p=linux.git 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 --- 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;