summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2018-02-28 03:15:21 +0300
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-03-25 20:03:58 +0300
commit59a80b5e892ddee09139f7d7942effdf1ca532e4 (patch)
treeb456632dd8f284577b6d51be6a075234bb49c4c1 /scripts
parentf467c5640c29ad258c3cd8186a776c82fc3b8057 (diff)
downloadlinux-59a80b5e892ddee09139f7d7942effdf1ca532e4.tar.xz
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>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/conf.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 822dc51923d6..4227d3ba5ed2 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -424,7 +424,7 @@ static void check_conf(struct menu *menu)
if (sym->name && !sym_is_choice_value(sym)) {
printf("%s%s\n", CONFIG_, sym->name);
}
- } else if (input_mode != olddefconfig) {
+ } else {
if (!conf_cnt++)
printf(_("*\n* Restart config...\n*\n"));
rootEntry = menu_get_parent_menu(menu);
@@ -666,15 +666,15 @@ int main(int ac, char **av)
/* fall through */
case oldconfig:
case listnewconfig:
- case olddefconfig:
case silentoldconfig:
/* Update until a loop caused no more changes */
do {
conf_cnt = 0;
check_conf(&rootmenu);
- } while (conf_cnt &&
- (input_mode != listnewconfig &&
- input_mode != olddefconfig));
+ } while (conf_cnt && input_mode != listnewconfig);
+ break;
+ case olddefconfig:
+ default:
break;
}