Skip to content

Commit

Permalink
kconfig: use parent->dep as the parentdep of 'menu'
Browse files Browse the repository at this point in the history
In menu_finalize(), the dependency of a menu entry is propagated
downwards.

For the 'menu', parent->dep and parent->prompt->visible.expr have
the same expression. Both accumulate the 'depends on' of itself and
upper menu entries.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
Masahiro Yamada committed Jan 6, 2020
1 parent f64048a commit de026ca
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/kconfig/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,12 +326,10 @@ void menu_finalize(struct menu *parent)
* choice value symbols.
*/
parentdep = expr_alloc_symbol(sym);
} else if (parent->prompt)
/* Menu node for 'menu' */
parentdep = parent->prompt->visible.expr;
else
/* Menu node for 'if' */
} else {
/* Menu node for 'menu', 'if' */
parentdep = parent->dep;
}

/* For each child menu node... */
for (menu = parent->list; menu; menu = menu->next) {
Expand Down

0 comments on commit de026ca

Please sign in to comment.