Skip to content

Commit 59a80b5

Browse files
committed
kconfig: do not call check_conf() for olddefconfig
check_conf() traverses the menu tree, but it is completely no-op for olddefconfig because the following if-else block does nothing. if (input_mode == listnewconfig) { ... } else if (input_mode != olddefconfig) { ... } As the help message says, olddefconfig automatically sets new symbols to their default value. There is no room for manual intervention. So, calling check_conf() for olddefconfig is odd in the first place. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
1 parent f467c56 commit 59a80b5

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎scripts/kconfig/conf.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ static void check_conf(struct menu *menu)
424424
if (sym->name && !sym_is_choice_value(sym)) {
425425
printf("%s%s\n", CONFIG_, sym->name);
426426
}
427-
} else if (input_mode != olddefconfig) {
427+
} else {
428428
if (!conf_cnt++)
429429
printf(_("*\n* Restart config...\n*\n"));
430430
rootEntry = menu_get_parent_menu(menu);
@@ -666,15 +666,15 @@ int main(int ac, char **av)
666666
/* fall through */
667667
case oldconfig:
668668
case listnewconfig:
669-
case olddefconfig:
670669
case silentoldconfig:
671670
/* Update until a loop caused no more changes */
672671
do {
673672
conf_cnt = 0;
674673
check_conf(&rootmenu);
675-
} while (conf_cnt &&
676-
(input_mode != listnewconfig &&
677-
input_mode != olddefconfig));
674+
} while (conf_cnt && input_mode != listnewconfig);
675+
break;
676+
case olddefconfig:
677+
default:
678678
break;
679679
}
680680

0 commit comments

Comments
 (0)