Skip to content

Commit 6ffe4fd

Browse files
committed
kconfig: use sym_get_choice_menu() in sym_check_prop()
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>
1 parent bfb57ef commit 6ffe4fd

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

scripts/kconfig/menu.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -263,11 +263,9 @@ static void sym_check_prop(struct symbol *sym)
263263
sym->name);
264264
}
265265
if (sym_is_choice(sym)) {
266-
struct property *choice_prop =
267-
sym_get_choice_prop(sym2);
266+
struct menu *choice = sym_get_choice_menu(sym2);
268267

269-
if (!choice_prop ||
270-
prop_get_symbol(choice_prop) != sym)
268+
if (!choice || choice->sym != sym)
271269
prop_warn(prop,
272270
"choice default symbol '%s' is not contained in the choice",
273271
sym2->name);

0 commit comments

Comments
 (0)