summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-06-18 13:35:28 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2024-07-15 19:08:37 +0300
commit609fc4099b3482ba774712376d56316c561432ff (patch)
tree9aa8bd53fea6e5d0f9a0aacdae688d31523aebed /scripts
parentd8f8bbcf4b94fefbf9e2f0d3a67b7190507afc48 (diff)
downloadlinux-609fc4099b3482ba774712376d56316c561432ff.tar.xz
kconfig: use sym_get_choice_menu() in sym_check_choice_deps()
Choices and their members are associated via the P_CHOICE property. Currently, prop_get_symbol(sym_get_choice_prop()) is used to obtain the choice of the given choice member. Replace it with sym_get_choice_menu(), which retrieves the choice without relying on P_CHOICE. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/symbol.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 79f1b5e1cc9e..22c15a103371 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -1280,9 +1280,13 @@ out:
if (menu->sym)
menu->sym->flags &= ~SYMBOL_CHECK;
- if (sym2 && sym_is_choice_value(sym2) &&
- prop_get_symbol(sym_get_choice_prop(sym2)) == choice)
- sym2 = choice;
+ if (sym2) {
+ struct menu *choice_menu2;
+
+ choice_menu2 = sym_get_choice_menu(sym2);
+ if (choice_menu2 == choice_menu)
+ sym2 = choice;
+ }
dep_stack_remove();