Skip to content

Commit d8f8bbc

Browse files
committed
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 <[email protected]>
1 parent 8926bc9 commit d8f8bbc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scripts/kconfig/symbol.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,12 +1078,14 @@ static void sym_check_print_recursive(struct symbol *last_sym)
10781078
struct dep_stack *stack;
10791079
struct symbol *sym, *next_sym;
10801080
struct menu *menu = NULL;
1081+
struct menu *choice;
10811082
struct property *prop;
10821083
struct dep_stack cv_stack;
10831084

1084-
if (sym_is_choice_value(last_sym)) {
1085+
choice = sym_get_choice_menu(last_sym);
1086+
if (choice) {
10851087
dep_stack_insert(&cv_stack, last_sym);
1086-
last_sym = prop_get_symbol(sym_get_choice_prop(last_sym));
1088+
last_sym = choice->sym;
10871089
}
10881090

10891091
for (stack = check_top; stack != NULL; stack = stack->prev)

0 commit comments

Comments
 (0)