History

kconfig: m/nconf: remove dead code to display value of bool choice

Previously, optional bool choices met the following conditions simultaneously: - sym_is_choice(sym) - sym_is_changeable(sym) - type == S_BOOLEAN It no longer occurs since 6a1215888e23 ("kconfig: remove 'optional' property support"). Remove the dead code.

Masahiro Yamada committed 2 years ago

Commit cc3e4e51 parent e89b4612 files · +14 −29Browse files

Showing the changes to scripts (2 of 2 files). Show all

Unified · Split

2 files
  1. scripts/kconfig/mconf.c +5 −12
  2. scripts/kconfig/nconf.c +9 −17
scripts/kconfig/mconf.c+5−12
@@ -525,19 +525,12 @@ static void build_conf(struct menu *menu) · 524 unmodified lines
525 525
526 val = sym_get_tristate_value(sym);526 val = sym_get_tristate_value(sym);
527 if (sym_is_changeable(sym)) {527 if (sym_is_changeable(sym)) {
528 switch (type) {528 switch (val) {
529 case S_BOOLEAN:529 case yes: ch = '*'; break;
530 item_make("[%c]", val == no ? ' ' : '*');530 case mod: ch = 'M'; break;
531 break;531 default: ch = ' '; break;
532 case S_TRISTATE:
533 switch (val) {
534 case yes: ch = '*'; break;
535 case mod: ch = 'M'; break;
536 default: ch = ' '; break;
537 }
538 item_make("<%c>", ch);
539 break;
540 }532 }
533 item_make("<%c>", ch);
541 item_set_tag('t');534 item_set_tag('t');
542 item_set_data(menu);535 item_set_data(menu);
543 } else {536 } else {
scripts/kconfig/nconf.c+9−17
@@ -826,26 +826,18 @@ static void build_conf(struct menu *menu) · 825 unmodified lines
826 826
827 val = sym_get_tristate_value(sym);827 val = sym_get_tristate_value(sym);
828 if (sym_is_changeable(sym)) {828 if (sym_is_changeable(sym)) {
829 switch (type) {829 switch (val) {
830 case S_BOOLEAN:830 case yes:
831 item_make(menu, 't', "[%c]",831 ch = '*';
832 val == no ? ' ' : '*');
833 break;832 break;
834 case S_TRISTATE:833 case mod:
835 switch (val) {834 ch = 'M';
836 case yes:835 break;
837 ch = '*';836 default:
838 break;837 ch = ' ';
839 case mod:
840 ch = 'M';
841 break;
842 default:
843 ch = ' ';
844 break;
845 }
846 item_make(menu, 't', "<%c>", ch);
847 break;838 break;
848 }839 }
840 item_make(menu, 't', "<%c>", ch);
849 } else {841 } else {
850 item_make(menu, def_menu ? 't' : ':', " ");842 item_make(menu, def_menu ? 't' : ':', " ");
851 }843 }