summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-05-14 02:31:42 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2024-05-15 21:18:41 +0300
commit6ffe4fdf8901dc0a15d7278531503ecd4522ae15 (patch)
tree9fdcf5e2b6b30bd4761a74fb19a5fef4e9a3c4ba /scripts
parentbfb57ef0544ae6f67bf83430aa0bb877897da783 (diff)
downloadlinux-6ffe4fdf8901dc0a15d7278531503ecd4522ae15.tar.xz
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/menu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index bee96c9964fd..53151c5a6028 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -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);