Skip to content

Commit d3465af

Browse files
ulfalizermasahir0y
authored andcommitted
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 <[email protected]> Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 3e41ba0 commit d3465af

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

scripts/kconfig/menu.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,13 @@ void menu_finalize(struct menu *parent)
323323
if (menu->sym && menu->sym->type == S_UNKNOWN)
324324
menu_set_type(sym->type);
325325
}
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+
*/
326333
parentdep = expr_alloc_symbol(sym);
327334
} else if (parent->prompt)
328335
parentdep = parent->prompt->visible.expr;

0 commit comments

Comments
 (0)