]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
kconfig: use sym_get_choice_menu() in sym_check_print_recursive()
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 18 Jun 2024 10:35:27 +0000 (19:35 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Mon, 15 Jul 2024 16:08:37 +0000 (01:08 +0900)
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>
scripts/kconfig/symbol.c

index 56e7a76e7a7786c67c1953dd88719c3c94ee5584..79f1b5e1cc9eadaa84cb1444c8922e6a0475ed7b 100644 (file)
@@ -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)