lkml.org 
[lkml]   [2018]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] kconfig: Clarify choice dependency propagation
Date
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>
---
scripts/kconfig/menu.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 92d3f06cd8a2..53964d911708 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 symbols.
+ */
parentdep = expr_alloc_symbol(sym);
} else if (parent->prompt)
parentdep = parent->prompt->visible.expr;
--
2.14.1
\
 
 \ /
  Last update: 2018-01-14 23:27    [W:0.058 / U:4.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site