kconfig: Clarify choice dependency propagation
authorUlf Magnusson <ulfalizer@gmail.com>
Sun, 14 Jan 2018 14:12:05 +0000 (15:12 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 10 Feb 2019 20:54:35 +0000 (21:54 +0100)
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>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
config/menu.c

index 7634d567e77949d2f7a71d05a5de8d9e96403500..dcf22008b2d6e4732d1e2785b0706395a8e1b071 100644 (file)
@@ -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;