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

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/kconfig/conf.c+5−5
@@ -424,7 +424,7 @@ static void check_conf(struct menu *menu) · 423 unmodified lines
424 if (sym->name && !sym_is_choice_value(sym)) {424 if (sym->name && !sym_is_choice_value(sym)) {
425 printf("%s%s\n", CONFIG_, sym->name);425 printf("%s%s\n", CONFIG_, sym->name);
426 }426 }
427 } else if (input_mode != olddefconfig) {427 } else {
428 if (!conf_cnt++)428 if (!conf_cnt++)
429 printf(_("*\n* Restart config...\n*\n"));429 printf(_("*\n* Restart config...\n*\n"));
430 rootEntry = menu_get_parent_menu(menu);430 rootEntry = menu_get_parent_menu(menu);
@@ -666,15 +666,15 @@ int main(int ac, char **av) · 235 unmodified lines
666 /* fall through */666 /* fall through */
667 case oldconfig:667 case oldconfig:
668 case listnewconfig:668 case listnewconfig:
669 case olddefconfig:
670 case silentoldconfig:669 case silentoldconfig:
671 /* Update until a loop caused no more changes */670 /* Update until a loop caused no more changes */
672 do {671 do {
673 conf_cnt = 0;672 conf_cnt = 0;
674 check_conf(&rootmenu);673 check_conf(&rootmenu);
675 } while (conf_cnt &&674 } while (conf_cnt && input_mode != listnewconfig);
676 (input_mode != listnewconfig &&675 break;
677 input_mode != olddefconfig));676 case olddefconfig:
677 default:
678 break;678 break;
679 }679 }
680 680