e2 30 scripts/kconfig/expr.c struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2) e2 35 scripts/kconfig/expr.c e->right.expr = e2; e2 48 scripts/kconfig/expr.c struct expr *expr_alloc_and(struct expr *e1, struct expr *e2) e2 51 scripts/kconfig/expr.c return e2; e2 52 scripts/kconfig/expr.c return e2 ? expr_alloc_two(E_AND, e1, e2) : e1; e2 55 scripts/kconfig/expr.c struct expr *expr_alloc_or(struct expr *e1, struct expr *e2) e2 58 scripts/kconfig/expr.c return e2; e2 59 scripts/kconfig/expr.c return e2 ? expr_alloc_two(E_OR, e1, e2) : e1; e2 133 scripts/kconfig/expr.c __expr_eliminate_eq(type, &e1->left.expr, &e2); e2 134 scripts/kconfig/expr.c __expr_eliminate_eq(type, &e1->right.expr, &e2); e2 137 scripts/kconfig/expr.c if (e2->type == type) { e2 138 scripts/kconfig/expr.c __expr_eliminate_eq(type, &e1, &e2->left.expr); e2 139 scripts/kconfig/expr.c __expr_eliminate_eq(type, &e1, &e2->right.expr); e2 142 scripts/kconfig/expr.c if (e1->type == E_SYMBOL && e2->type == E_SYMBOL && e2 143 scripts/kconfig/expr.c e1->left.sym == e2->left.sym && e2 146 scripts/kconfig/expr.c if (!expr_eq(e1, e2)) e2 149 scripts/kconfig/expr.c expr_free(e1); expr_free(e2); e2 153 scripts/kconfig/expr.c e2 = expr_alloc_symbol(&symbol_no); e2 157 scripts/kconfig/expr.c e2 = expr_alloc_symbol(&symbol_yes); e2 166 scripts/kconfig/expr.c if (!e1 || !e2) e2 175 scripts/kconfig/expr.c if (e1->type != e2->type) switch (e2->type) { e2 178 scripts/kconfig/expr.c __expr_eliminate_eq(e2->type, ep1, ep2); e2 183 scripts/kconfig/expr.c e2 = expr_eliminate_yn(e2); e2 189 scripts/kconfig/expr.c int expr_eq(struct expr *e1, struct expr *e2) e2 193 scripts/kconfig/expr.c if (e1->type != e2->type) e2 198 scripts/kconfig/expr.c return e1->left.sym == e2->left.sym && e1->right.sym == e2->right.sym; e2 200 scripts/kconfig/expr.c return e1->left.sym == e2->left.sym; e2 202 scripts/kconfig/expr.c return expr_eq(e1->left.expr, e2->left.expr); e2 206 scripts/kconfig/expr.c e2 = expr_copy(e2); e2 208 scripts/kconfig/expr.c expr_eliminate_eq(&e1, &e2); e2 209 scripts/kconfig/expr.c res = (e1->type == E_SYMBOL && e2->type == E_SYMBOL && e2 210 scripts/kconfig/expr.c e1->left.sym == e2->left.sym); e2 212 scripts/kconfig/expr.c expr_free(e2); e2 224 scripts/kconfig/expr.c expr_fprint(e2, stdout); e2 346 scripts/kconfig/expr.c static struct expr *expr_join_or(struct expr *e1, struct expr *e2) e2 351 scripts/kconfig/expr.c if (expr_eq(e1, e2)) e2 355 scripts/kconfig/expr.c if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) e2 364 scripts/kconfig/expr.c if (e2->type == E_NOT) { e2 365 scripts/kconfig/expr.c if (e2->left.expr->type != E_SYMBOL) e2 367 scripts/kconfig/expr.c sym2 = e2->left.expr->left.sym; e2 369 scripts/kconfig/expr.c sym2 = e2->left.sym; e2 375 scripts/kconfig/expr.c if (e1->type == E_EQUAL && e2->type == E_EQUAL && e2 376 scripts/kconfig/expr.c ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || e2 377 scripts/kconfig/expr.c (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) { e2 381 scripts/kconfig/expr.c if (e1->type == E_EQUAL && e2->type == E_EQUAL && e2 382 scripts/kconfig/expr.c ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || e2 383 scripts/kconfig/expr.c (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) { e2 387 scripts/kconfig/expr.c if (e1->type == E_EQUAL && e2->type == E_EQUAL && e2 388 scripts/kconfig/expr.c ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || e2 389 scripts/kconfig/expr.c (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) { e2 395 scripts/kconfig/expr.c if ((e1->type == E_NOT && e1->left.expr->type == E_SYMBOL && e2->type == E_SYMBOL) || e2 396 scripts/kconfig/expr.c (e2->type == E_NOT && e2->left.expr->type == E_SYMBOL && e1->type == E_SYMBOL)) e2 404 scripts/kconfig/expr.c expr_fprint(e2, stdout); e2 410 scripts/kconfig/expr.c static struct expr *expr_join_and(struct expr *e1, struct expr *e2) e2 415 scripts/kconfig/expr.c if (expr_eq(e1, e2)) e2 419 scripts/kconfig/expr.c if (e2->type != E_EQUAL && e2->type != E_UNEQUAL && e2->type != E_SYMBOL && e2->type != E_NOT) e2 428 scripts/kconfig/expr.c if (e2->type == E_NOT) { e2 429 scripts/kconfig/expr.c if (e2->left.expr->type != E_SYMBOL) e2 431 scripts/kconfig/expr.c sym2 = e2->left.expr->left.sym; e2 433 scripts/kconfig/expr.c sym2 = e2->left.sym; e2 439 scripts/kconfig/expr.c if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_yes) || e2 440 scripts/kconfig/expr.c (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_yes)) e2 444 scripts/kconfig/expr.c if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_no) || e2 445 scripts/kconfig/expr.c (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_no)) e2 449 scripts/kconfig/expr.c if ((e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_mod) || e2 450 scripts/kconfig/expr.c (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_mod)) e2 455 scripts/kconfig/expr.c if (e1->type == E_EQUAL && e2->type == E_UNEQUAL) { e2 458 scripts/kconfig/expr.c if ((e2->right.sym->flags & SYMBOL_CONST) && (sym2->flags & SYMBOL_CONST)) e2 459 scripts/kconfig/expr.c return sym2 != e2->right.sym ? expr_alloc_comp(E_EQUAL, sym1, sym2) e2 462 scripts/kconfig/expr.c if (e1->type == E_UNEQUAL && e2->type == E_EQUAL) { e2 464 scripts/kconfig/expr.c sym2 = e2->right.sym; e2 469 scripts/kconfig/expr.c if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && e2 470 scripts/kconfig/expr.c ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_no) || e2 471 scripts/kconfig/expr.c (e1->right.sym == &symbol_no && e2->right.sym == &symbol_yes))) e2 475 scripts/kconfig/expr.c if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && e2 476 scripts/kconfig/expr.c ((e1->right.sym == &symbol_yes && e2->right.sym == &symbol_mod) || e2 477 scripts/kconfig/expr.c (e1->right.sym == &symbol_mod && e2->right.sym == &symbol_yes))) e2 481 scripts/kconfig/expr.c if (e1->type == E_UNEQUAL && e2->type == E_UNEQUAL && e2 482 scripts/kconfig/expr.c ((e1->right.sym == &symbol_mod && e2->right.sym == &symbol_no) || e2 483 scripts/kconfig/expr.c (e1->right.sym == &symbol_no && e2->right.sym == &symbol_mod))) e2 487 scripts/kconfig/expr.c if ((e1->type == E_SYMBOL && e2->type == E_EQUAL && e2->right.sym == &symbol_mod) || e2 488 scripts/kconfig/expr.c (e2->type == E_SYMBOL && e1->type == E_EQUAL && e1->right.sym == &symbol_mod) || e2 489 scripts/kconfig/expr.c (e1->type == E_SYMBOL && e2->type == E_UNEQUAL && e2->right.sym == &symbol_yes) || e2 490 scripts/kconfig/expr.c (e2->type == E_SYMBOL && e1->type == E_UNEQUAL && e1->right.sym == &symbol_yes)) e2 498 scripts/kconfig/expr.c expr_fprint(e2, stdout); e2 511 scripts/kconfig/expr.c expr_eliminate_dups1(type, &e1->left.expr, &e2); e2 512 scripts/kconfig/expr.c expr_eliminate_dups1(type, &e1->right.expr, &e2); e2 515 scripts/kconfig/expr.c if (e2->type == type) { e2 516 scripts/kconfig/expr.c expr_eliminate_dups1(type, &e1, &e2->left.expr); e2 517 scripts/kconfig/expr.c expr_eliminate_dups1(type, &e1, &e2->right.expr); e2 520 scripts/kconfig/expr.c if (e1 == e2) e2 532 scripts/kconfig/expr.c tmp = expr_join_or(e1, e2); e2 534 scripts/kconfig/expr.c expr_free(e1); expr_free(e2); e2 536 scripts/kconfig/expr.c e2 = tmp; e2 541 scripts/kconfig/expr.c tmp = expr_join_and(e1, e2); e2 543 scripts/kconfig/expr.c expr_free(e1); expr_free(e2); e2 545 scripts/kconfig/expr.c e2 = tmp; e2 563 scripts/kconfig/expr.c expr_eliminate_dups2(type, &e1->left.expr, &e2); e2 564 scripts/kconfig/expr.c expr_eliminate_dups2(type, &e1->right.expr, &e2); e2 567 scripts/kconfig/expr.c if (e2->type == type) { e2 568 scripts/kconfig/expr.c expr_eliminate_dups2(type, &e1, &e2->left.expr); e2 569 scripts/kconfig/expr.c expr_eliminate_dups2(type, &e1, &e2->right.expr); e2 571 scripts/kconfig/expr.c if (e1 == e2) e2 579 scripts/kconfig/expr.c tmp2 = expr_copy(e2); e2 594 scripts/kconfig/expr.c tmp2 = expr_copy(e2); e2 853 scripts/kconfig/expr.c expr_extract_eq(type, ep, &e1->left.expr, &e2); e2 854 scripts/kconfig/expr.c expr_extract_eq(type, ep, &e1->right.expr, &e2); e2 857 scripts/kconfig/expr.c if (e2->type == type) { e2 858 scripts/kconfig/expr.c expr_extract_eq(type, ep, ep1, &e2->left.expr); e2 859 scripts/kconfig/expr.c expr_extract_eq(type, ep, ep1, &e2->right.expr); e2 862 scripts/kconfig/expr.c if (expr_eq(e1, e2)) { e2 864 scripts/kconfig/expr.c expr_free(e2); e2 867 scripts/kconfig/expr.c e2 = expr_alloc_symbol(&symbol_yes); e2 870 scripts/kconfig/expr.c e2 = expr_alloc_symbol(&symbol_no); e2 879 scripts/kconfig/expr.c struct expr *e1, *e2; e2 890 scripts/kconfig/expr.c e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); e2 892 scripts/kconfig/expr.c e = expr_alloc_two(E_AND, e1, e2); e2 894 scripts/kconfig/expr.c e = expr_alloc_two(E_OR, e1, e2); e2 900 scripts/kconfig/expr.c e2 = expr_trans_compare(e->right.expr, E_EQUAL, sym); e2 902 scripts/kconfig/expr.c e = expr_alloc_two(E_OR, e1, e2); e2 904 scripts/kconfig/expr.c e = expr_alloc_two(E_AND, e1, e2); e2 1028 scripts/kconfig/expr.c struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2) e2 1035 scripts/kconfig/expr.c expr_simplify_unmet_dep(e1->left.expr, e2), e2 1036 scripts/kconfig/expr.c expr_simplify_unmet_dep(e1->right.expr, e2)); e2 1039 scripts/kconfig/expr.c e = expr_alloc_and(expr_copy(e1), expr_copy(e2)); e2 202 scripts/kconfig/expr.h struct expr *expr_alloc_two(enum expr_type type, struct expr *e1, struct expr *e2); e2 204 scripts/kconfig/expr.h struct expr *expr_alloc_and(struct expr *e1, struct expr *e2); e2 205 scripts/kconfig/expr.h struct expr *expr_alloc_or(struct expr *e1, struct expr *e2); e2 208 scripts/kconfig/expr.h int expr_eq(struct expr *e1, struct expr *e2); e2 221 scripts/kconfig/expr.h struct expr *expr_simplify_unmet_dep(struct expr *e1, struct expr *e2);