History

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.

Masahiro Yamada committed 8 years ago

Commit 59a80b51 parent f467c561 file · +5 −5Browse files

Unified · Split

scripts/kconfig/conf.c+5−5
@@ -424,7 +424,7 @@ static void check_conf(struct menu *menu) · 423 unmodified lines
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) · 235 unmodified lines
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