summaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-05-19 15:34:02 +0200
committerMasahiro Yamada <masahiroy@kernel.org>2024-05-29 09:40:03 +0200
commit31894d35b51ba61e2931cbf28e80114a4f72bc2b (patch)
tree5dfdc8f4395ff75665da469b7583254cf7000a4b /scripts/kconfig
parentkconfig: fix comparison to constant symbols, 'm', 'n' (diff)
downloadlinux-31894d35b51ba61e2931cbf28e80114a4f72bc2b.tar.xz
linux-31894d35b51ba61e2931cbf28e80114a4f72bc2b.zip
kconfig: remove redundant check in expr_join_or()
The check for 'sym1 == sym2' is redundant here because it has already been done a few lines above: if (sym1 != sym2) return NULL; Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/expr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index a290de36307b..4d95fce5f9a7 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -476,7 +476,7 @@ static struct expr *expr_join_or(struct expr *e1, struct expr *e2)
return expr_alloc_comp(E_UNEQUAL, sym1, &symbol_yes);
}
}
- if (sym1->type == S_BOOLEAN && sym1 == sym2) {
+ if (sym1->type == S_BOOLEAN) {
if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) ||
(e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL))
return expr_alloc_symbol(&symbol_yes);