summaryrefslogtreecommitdiff
path: root/scripts/kconfig/parser.y
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-04-21 18:02:52 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-05-02 19:48:26 +0900
commit03c4ecaa5c76640f1993733be1bded18e0c074d5 (patch)
treea38aedecda2a2f138dac81546ec820a2d9bf3c79 /scripts/kconfig/parser.y
parent7284b4fbc8473965f9c053f3fa8b194af8ed4738 (diff)
kconfig: use menu_for_each_entry() to traverse menu tree
Use menu_for_each_entry() to traverse the menu tree instead of implementing similar logic in each function. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/parser.y')
-rw-r--r--scripts/kconfig/parser.y13
1 files changed, 1 insertions, 12 deletions
diff --git a/scripts/kconfig/parser.y b/scripts/kconfig/parser.y
index 7fb996612c96..8f339b47fe8d 100644
--- a/scripts/kconfig/parser.y
+++ b/scripts/kconfig/parser.y
@@ -517,20 +517,9 @@ void conf_parse(const char *name)
menu_finalize();
- menu = &rootmenu;
- while (menu) {
+ menu_for_each_entry(menu) {
if (menu->sym && sym_check_deps(menu->sym))
yynerrs++;
-
- if (menu->list) {
- menu = menu->list;
- continue;
- }
-
- while (!menu->next && menu->parent)
- menu = menu->parent;
-
- menu = menu->next;
}
if (yynerrs)