summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-07-11 09:33:17 +0200
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-07-11 16:37:55 +0200
commite3cd5136a4ecece6a7599a07add0dfb811a7f49d (patch)
tree3893506f241a8fe9c2d3b284f70386d4046ef912 /scripts
parentkconfig: Fix spelling of sym_is_changable (diff)
downloadlinux-e3cd5136a4ecece6a7599a07add0dfb811a7f49d.tar.xz
linux-e3cd5136a4ecece6a7599a07add0dfb811a7f49d.zip
kconfig: remove meaningless if-conditional in conf_read()
sym_is_choice(sym) has already been checked by previous if-block: if (sym_is_choice(sym) || (sym->flags & SYMBOL_NO_WRITE)) continue; Hence, the following code is redundant, and the comment is misleading: if (!sym_is_choice(sym)) continue; /* fall through */ It always takes 'continue', never falls though. Clean up the dead code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/kconfig/confdata.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index caab7336abc1..501fdcc5e999 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -534,11 +534,9 @@ int conf_read(const char *name)
switch (sym->type) {
case S_BOOLEAN:
case S_TRISTATE:
- if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym))
- break;
- if (!sym_is_choice(sym))
+ if (sym->def[S_DEF_USER].tri == sym_get_tristate_value(sym))
continue;
- /* fall through */
+ break;
default:
if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val))
continue;