diff options
Diffstat (limited to 'scripts/kconfig/expr.c')
| -rw-r--r-- | scripts/kconfig/expr.c | 31 | 
1 files changed, 1 insertions, 30 deletions
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index a290de36307b..fcc190b67b6f 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c @@ -397,35 +397,6 @@ static struct expr *expr_eliminate_yn(struct expr *e)  }  /* - * bool FOO!=n => FOO - */ -struct expr *expr_trans_bool(struct expr *e) -{ -	if (!e) -		return NULL; -	switch (e->type) { -	case E_AND: -	case E_OR: -	case E_NOT: -		e->left.expr = expr_trans_bool(e->left.expr); -		e->right.expr = expr_trans_bool(e->right.expr); -		break; -	case E_UNEQUAL: -		// FOO!=n -> FOO -		if (e->left.sym->type == S_TRISTATE) { -			if (e->right.sym == &symbol_no) { -				e->type = E_SYMBOL; -				e->right.sym = NULL; -			} -		} -		break; -	default: -		; -	} -	return e; -} - -/*   * e1 || e2 -> ?   */  static struct expr *expr_join_or(struct expr *e1, struct expr *e2) @@ -476,7 +447,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);  | 
