diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2024-05-10 19:23:22 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2024-05-14 23:36:19 +0900 |
commit | cc3e4e5e38f97da6085659fabbef2d560c05d1c3 (patch) | |
tree | c3610431755d584ffe0bdfdfd46997674080a2a7 /scripts/kconfig/nconf.c | |
parent | e89b46159c510e2762ed39af65d530178122b6fb (diff) | |
download | linux-cc3e4e5e38f97da6085659fabbef2d560c05d1c3.tar.gz linux-cc3e4e5e38f97da6085659fabbef2d560c05d1c3.tar.bz2 linux-cc3e4e5e38f97da6085659fabbef2d560c05d1c3.zip |
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.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig/nconf.c')
-rw-r--r-- | scripts/kconfig/nconf.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c index bf460233a4cc..93047cd28f3f 100644 --- a/scripts/kconfig/nconf.c +++ b/scripts/kconfig/nconf.c @@ -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' : ':', " "); } |