summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-06-18 19:35:27 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-07-16 01:08:37 +0900
commitd8f8bbcf4b94fefbf9e2f0d3a67b7190507afc48 (patch)
treebbabeb5a56088bc63db989a45f096c75be12a49a /scripts
parent8926bc901d617f21d5ebd2eda17aeea55bbecd9a (diff)
kconfig: use sym_get_choice_menu() in sym_check_print_recursive()
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.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 56e7a76e7a77..79f1b5e1cc9e 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -1078,12 +1078,14 @@ static void sym_check_print_recursive(struct symbol *last_sym)
struct dep_stack *stack;
struct symbol *sym, *next_sym;
struct menu *menu = NULL;
+ struct menu *choice;
struct property *prop;
struct dep_stack cv_stack;
- if (sym_is_choice_value(last_sym)) {
+ choice = sym_get_choice_menu(last_sym);
+ if (choice) {
dep_stack_insert(&cv_stack, last_sym);
- last_sym = prop_get_symbol(sym_get_choice_prop(last_sym));
+ last_sym = choice->sym;
}
for (stack = check_top; stack != NULL; stack = stack->prev)