Skip to content

Commit 7d28067

Browse files
committed
kconfig: use linked list in sym_set_changed()
Following the approach employed in commit bedf923 ("kconfig: use linked list in get_symbol_str() to iterate over menus"), simplify the iteration on the menus of the specified symbol. Signed-off-by: Masahiro Yamada <[email protected]>
1 parent 4cc7e6c commit 7d28067

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

scripts/kconfig/symbol.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,11 @@ static void sym_validate_range(struct symbol *sym)
152152

153153
static void sym_set_changed(struct symbol *sym)
154154
{
155-
struct property *prop;
155+
struct menu *menu;
156156

157157
sym->flags |= SYMBOL_CHANGED;
158-
for (prop = sym->prop; prop; prop = prop->next) {
159-
if (prop->menu)
160-
prop->menu->flags |= MENU_CHANGED;
161-
}
158+
list_for_each_entry(menu, &sym->menus, link)
159+
menu->flags |= MENU_CHANGED;
162160
}
163161

164162
static void sym_set_all_changed(void)

0 commit comments

Comments
 (0)