From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH v2 12/12] kconfig: remove E_LIST expression type
Date: Tue, 18 Jun 2024 19:35:31 +0900 [thread overview]
Message-ID: <20240618103541.3508486-13-masahiroy@kernel.org> (raw)
In-Reply-To: <20240618103541.3508486-1-masahiroy@kernel.org>
E_LIST was preveously used to form an expression tree consisting of
choice members.
It is no longer used.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
(no changes since v1)
scripts/kconfig/expr.c | 15 ---------------
scripts/kconfig/expr.h | 2 +-
scripts/kconfig/symbol.c | 3 +--
3 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c
index bea82d5cac83..6d4b5a5a1e62 100644
--- a/scripts/kconfig/expr.c
+++ b/scripts/kconfig/expr.c
@@ -90,7 +90,6 @@ struct expr *expr_copy(const struct expr *org)
break;
case E_AND:
case E_OR:
- case E_LIST:
e->left.expr = expr_copy(org->left.expr);
e->right.expr = expr_copy(org->right.expr);
break;
@@ -286,7 +285,6 @@ int expr_eq(struct expr *e1, struct expr *e2)
expr_free(e2);
trans_count = old_count;
return res;
- case E_LIST:
case E_RANGE:
case E_NONE:
/* panic */;
@@ -676,7 +674,6 @@ struct expr *expr_transform(struct expr *e)
case E_LTH:
case E_UNEQUAL:
case E_SYMBOL:
- case E_LIST:
break;
default:
e->left.expr = expr_transform(e->left.expr);
@@ -947,7 +944,6 @@ struct expr *expr_trans_compare(struct expr *e, enum expr_type type, struct symb
break;
case E_SYMBOL:
return expr_alloc_comp(type, e->left.sym, sym);
- case E_LIST:
case E_RANGE:
case E_NONE:
/* panic */;
@@ -1097,10 +1093,6 @@ static int expr_compare_type(enum expr_type t1, enum expr_type t2)
if (t2 == E_OR)
return 1;
/* fallthrough */
- case E_OR:
- if (t2 == E_LIST)
- return 1;
- /* fallthrough */
default:
break;
}
@@ -1173,13 +1165,6 @@ void expr_print(struct expr *e,
fn(data, NULL, " && ");
expr_print(e->right.expr, fn, data, E_AND);
break;
- case E_LIST:
- fn(data, e->right.sym, e->right.sym->name);
- if (e->left.expr) {
- fn(data, NULL, " ^ ");
- expr_print(e->left.expr, fn, data, E_LIST);
- }
- break;
case E_RANGE:
fn(data, NULL, "[");
fn(data, e->left.sym, e->left.sym->name);
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index 58fd4c8c3762..8849a243b5e7 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -26,7 +26,7 @@ typedef enum tristate {
enum expr_type {
E_NONE, E_OR, E_AND, E_NOT,
E_EQUAL, E_UNEQUAL, E_LTH, E_LEQ, E_GTH, E_GEQ,
- E_LIST, E_SYMBOL, E_RANGE
+ E_SYMBOL, E_RANGE
};
union expr_data {
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index cf682a8a3f1e..e5441378c4b0 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -1316,8 +1316,7 @@ struct symbol *sym_check_deps(struct symbol *sym)
struct symbol *prop_get_symbol(struct property *prop)
{
- if (prop->expr && (prop->expr->type == E_SYMBOL ||
- prop->expr->type == E_LIST))
+ if (prop->expr && prop->expr->type == E_SYMBOL)
return prop->expr->left.sym;
return NULL;
}
--
2.43.0
prev parent reply other threads:[~2024-06-18 10:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 10:35 [PATCH v2 00/12] kconfig: fix choice value calculation with misc cleanups Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 01/12] kconfig: import list_move(_tail) and list_for_each_entry_reverse macros Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 02/12] kconfig: refactor choice value calculation Masahiro Yamada
2024-08-31 17:30 ` Niklas Söderlund
2024-09-01 9:10 ` Masahiro Yamada
2024-09-01 9:32 ` Niklas Söderlund
2024-06-18 10:35 ` [PATCH v2 03/12] kconfig: remove sym_get_choice_value() Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 04/12] kconfig: remove conf_unsaved in conf_read_simple() Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 05/12] kconfig: change sym_choice_default() to take the choice menu Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 06/12] kconfig: use menu_list_for_each_sym() in sym_choice_default() Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 07/12] kconfig: remove expr_list_for_each_sym() macro Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 08/12] kconfig: use sym_get_choice_menu() in sym_check_print_recursive() Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 09/12] kconfig: use sym_get_choice_menu() in sym_check_choice_deps() Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 10/12] kconfig: use sym_get_choice_menu() in sym_check_deps() Masahiro Yamada
2024-06-18 10:35 ` [PATCH v2 11/12] kconfig: remove P_CHOICE property Masahiro Yamada
2024-06-18 10:35 ` Masahiro Yamada [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240618103541.3508486-13-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox