mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-03 19:55:31 +00:00
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 6a1215888e
("kconfig: remove 'optional'
property support"). Remove the dead code.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
e89b46159c
commit
cc3e4e5e38
@ -525,19 +525,12 @@ static void build_conf(struct menu *menu)
|
||||
|
||||
val = sym_get_tristate_value(sym);
|
||||
if (sym_is_changeable(sym)) {
|
||||
switch (type) {
|
||||
case S_BOOLEAN:
|
||||
item_make("[%c]", val == no ? ' ' : '*');
|
||||
break;
|
||||
case S_TRISTATE:
|
||||
switch (val) {
|
||||
case yes: ch = '*'; break;
|
||||
case mod: ch = 'M'; break;
|
||||
default: ch = ' '; break;
|
||||
}
|
||||
item_make("<%c>", ch);
|
||||
break;
|
||||
switch (val) {
|
||||
case yes: ch = '*'; break;
|
||||
case mod: ch = 'M'; break;
|
||||
default: ch = ' '; break;
|
||||
}
|
||||
item_make("<%c>", ch);
|
||||
item_set_tag('t');
|
||||
item_set_data(menu);
|
||||
} else {
|
||||
|
@ -826,26 +826,18 @@ static void build_conf(struct menu *menu)
|
||||
|
||||
val = sym_get_tristate_value(sym);
|
||||
if (sym_is_changeable(sym)) {
|
||||
switch (type) {
|
||||
case S_BOOLEAN:
|
||||
item_make(menu, 't', "[%c]",
|
||||
val == no ? ' ' : '*');
|
||||
switch (val) {
|
||||
case yes:
|
||||
ch = '*';
|
||||
break;
|
||||
case S_TRISTATE:
|
||||
switch (val) {
|
||||
case yes:
|
||||
ch = '*';
|
||||
break;
|
||||
case mod:
|
||||
ch = 'M';
|
||||
break;
|
||||
default:
|
||||
ch = ' ';
|
||||
break;
|
||||
}
|
||||
item_make(menu, 't', "<%c>", ch);
|
||||
case mod:
|
||||
ch = 'M';
|
||||
break;
|
||||
default:
|
||||
ch = ' ';
|
||||
break;
|
||||
}
|
||||
item_make(menu, 't', "<%c>", ch);
|
||||
} else {
|
||||
item_make(menu, def_menu ? 't' : ':', " ");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user