Skip to content

Commit b139b43

Browse files
committed
kconfig: use sym_get_choice_menu() in sym_check_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 <[email protected]>
1 parent 609fc40 commit b139b43

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scripts/kconfig/symbol.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,8 +1295,8 @@ static struct symbol *sym_check_choice_deps(struct symbol *choice)
12951295

12961296
struct symbol *sym_check_deps(struct symbol *sym)
12971297
{
1298+
struct menu *choice;
12981299
struct symbol *sym2;
1299-
struct property *prop;
13001300

13011301
if (sym->flags & SYMBOL_CHECK) {
13021302
sym_check_print_recursive(sym);
@@ -1305,13 +1305,13 @@ struct symbol *sym_check_deps(struct symbol *sym)
13051305
if (sym->flags & SYMBOL_CHECKED)
13061306
return NULL;
13071307

1308-
if (sym_is_choice_value(sym)) {
1308+
choice = sym_get_choice_menu(sym);
1309+
if (choice) {
13091310
struct dep_stack stack;
13101311

13111312
/* for choice groups start the check with main choice symbol */
13121313
dep_stack_insert(&stack, sym);
1313-
prop = sym_get_choice_prop(sym);
1314-
sym2 = sym_check_deps(prop_get_symbol(prop));
1314+
sym2 = sym_check_deps(choice->sym);
13151315
dep_stack_remove();
13161316
} else if (sym_is_choice(sym)) {
13171317
sym2 = sym_check_choice_deps(sym);

0 commit comments

Comments
 (0)