Skip to content

Commit

Permalink
kconfig: use sym_get_choice_menu() in sym_check_prop()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
masahir0y committed May 15, 2024
1 parent bfb57ef commit 6ffe4fd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions scripts/kconfig/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,11 +263,9 @@ static void sym_check_prop(struct symbol *sym)
sym->name);
}
if (sym_is_choice(sym)) {
struct property *choice_prop =
sym_get_choice_prop(sym2);
struct menu *choice = sym_get_choice_menu(sym2);

if (!choice_prop ||
prop_get_symbol(choice_prop) != sym)
if (!choice || choice->sym != sym)
prop_warn(prop,
"choice default symbol '%s' is not contained in the choice",
sym2->name);
Expand Down

0 comments on commit 6ffe4fd

Please sign in to comment.