diff options
| author | Masahiro Yamada <masahiroy@kernel.org> | 2024-04-21 18:02:52 +0900 |
|---|---|---|
| committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-05-02 19:48:26 +0900 |
| commit | 03c4ecaa5c76640f1993733be1bded18e0c074d5 (patch) | |
| tree | a38aedecda2a2f138dac81546ec820a2d9bf3c79 /scripts/kconfig/parser.y | |
| parent | kconfig: add menu_next() function and menu_for_each(_sub)_entry macros (diff) | |
| download | linux-03c4ecaa5c76640f1993733be1bded18e0c074d5.tar.gz linux-03c4ecaa5c76640f1993733be1bded18e0c074d5.zip | |
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.y | 13 |
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) |
