kconfig: Clarify choice dependency propagation
PATCH 1/1 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.
--- scripts/kconfig/menu.c | 7 +++++++ 1 file changed, 7 insertions(+)
scripts/kconfig/menu.c +7 -0
@@ -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;
Signature · 1 line
2.14.1
2018-01-14 23:12 GMT+09:00 Ulf Magnusson <[email protected]>:
Quoted 15 lines
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]>--- scripts/kconfig/menu.c | 7 +++++++ 1 file changed, 7 insertions(+)scripts/kconfig/menu.c +0
-0
scripts/kconfig/menu.c void menu_finalize(struct menu *parent) · line 332
Quoted 10 lines
scripts/kconfig/menu.c +7
-0@@ -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. +*/
Does the last "choice symbols" mean "choice values"? The "choice" itself is a symbol with NULL name, so I'd like to clarify it.
Signature · 2 lines
Best Regards Masahiro Yamada
Quoted 22 lines · Masahiro Yamada
2018-01-14 23:12 GMT+09:00 Ulf Magnusson <[email protected]>:
Quoted 21 lines
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]>--- scripts/kconfig/menu.c | 7 +++++++ 1 file changed, 7 insertions(+)scripts/kconfig/menu.c +3
-0@@ -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
Quoted 8 lines
scripts/kconfig/menu.c void menu_finalize(struct menu *parent) · line 332
Quoted 4 lines
scripts/kconfig/menu.c +4
-0+* the contained items. This turns the mode of the +* choice into an upper bound on the visibility of the +* choice symbols. +*/ Does the last "choice symbols" mean "choice values"? The "choice" itself is a symbol with NULL name, so I'd like to clarify it.
Yep, means the choice values (which are symbols). "Choice values" would probably be clearer, yeah, or maybe "choice value symbols".
Should I submit a new version? I'm fine with just a 's/symbols/values/' or 's/symbols/value symbols/' otherwise.
Cheers,
Ulf
Hi Ulf,
2018-01-19 1:58 GMT+09:00 Ulf Magnusson <[email protected]>:
Quoted 33 lines
Quoted 22 lines · Masahiro Yamada
2018-01-14 23:12 GMT+09:00 Ulf Magnusson <[email protected]>:
Quoted 21 lines
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]>--- scripts/kconfig/menu.c | 7 +++++++ 1 file changed, 7 insertions(+)scripts/kconfig/menu.c +3
-0@@ -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 Quoted 8 lines
scripts/kconfig/menu.c void menu_finalize(struct menu *parent) · line 332
Quoted 4 lines
scripts/kconfig/menu.c +4
-0+* the contained items. This turns the mode of the +* choice into an upper bound on the visibility of the +* choice symbols. +*/ Does the last "choice symbols" mean "choice values"? The "choice" itself is a symbol with NULL name, so I'd like to clarify it.
Quoted 8 lines
Yep, means the choice values (which are symbols). "Choice values" would probably be clearer, yeah, or maybe "choice value symbols".
Should I submit a new version? I'm fine with just a 's/symbols/values/' or 's/symbols/value symbols/' otherwise.
Cheers,
Ulf
It is trivial, so I will locally fix it up.
s/symbols/value symbols/
Thanks!
Signature · 2 lines
Best Regards Masahiro Yamada
2018-01-19 11:29 GMT+09:00 Masahiro Yamada <[email protected]>:
Quoted 43 lines
Hi Ulf,
2018-01-19 1:58 GMT+09:00 Ulf Magnusson <[email protected]>:
Quoted 39 lines
Quoted 22 lines · Masahiro Yamada
2018-01-14 23:12 GMT+09:00 Ulf Magnusson <[email protected]>:
Quoted 21 lines
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]>--- scripts/kconfig/menu.c | 7 +++++++ 1 file changed, 7 insertions(+)scripts/kconfig/menu.c +3
-0@@ -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 Quoted 8 lines
scripts/kconfig/menu.c void menu_finalize(struct menu *parent) · line 332
Quoted 4 lines
scripts/kconfig/menu.c +4
-0+* the contained items. This turns the mode of the +* choice into an upper bound on the visibility of the +* choice symbols. +*/ Does the last "choice symbols" mean "choice values"? The "choice" itself is a symbol with NULL name, so I'd like to clarify it.
Yep, means the choice values (which are symbols). "Choice values" would probably be clearer, yeah, or maybe "choice value symbols".
Should I submit a new version? I'm fine with just a 's/symbols/values/' or 's/symbols/value symbols/' otherwise.
Quoted 8 lines
Quoted 2 lines
Cheers,
UlfIt is trivial, so I will locally fix it up.
s/symbols/value symbols/
Applied to linux-kbuild/kconfig
with s/symbols/value symbols/.
Thanks!
Signature · 2 lines
Best Regards Masahiro Yamada