History

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.

Masahiro Yamada committed 2 years ago

Commit d8f8bbc1 parent 8926bc91 file · +4 −2Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/kconfig/symbol.c+4−2
@@ -1078,12 +1078,14 @@ static void sym_check_print_recursive(struct symbol *last_sym) · 1077 unmodified lines
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)