mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-28 16:53:49 +00:00
kconfig: remove SYMBOL_CHOICEVAL flag
This flag is unneeded because a choice member can be detected by other means. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
6425e3b247
commit
94a4b0a4cb
@ -131,7 +131,6 @@ struct symbol {
|
||||
|
||||
#define SYMBOL_CONST 0x0001 /* symbol is const */
|
||||
#define SYMBOL_CHECK 0x0008 /* used during dependency checking */
|
||||
#define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */
|
||||
#define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */
|
||||
#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
|
||||
#define SYMBOL_WRITTEN 0x0800 /* track info to avoid double-write to .config */
|
||||
|
@ -1070,7 +1070,7 @@ static gchar **fill_row(struct menu *menu)
|
||||
row[COL_BTNVIS] = GINT_TO_POINTER(FALSE);
|
||||
return row;
|
||||
}
|
||||
if (sym->flags & SYMBOL_CHOICEVAL)
|
||||
if (sym_is_choice_value(sym))
|
||||
row[COL_BTNRAD] = GINT_TO_POINTER(TRUE);
|
||||
|
||||
stype = sym_get_type(sym);
|
||||
|
@ -128,10 +128,7 @@ static inline bool sym_is_choice(const struct symbol *sym)
|
||||
return sym->name == NULL;
|
||||
}
|
||||
|
||||
static inline bool sym_is_choice_value(const struct symbol *sym)
|
||||
{
|
||||
return sym->flags & SYMBOL_CHOICEVAL ? true : false;
|
||||
}
|
||||
bool sym_is_choice_value(const struct symbol *sym);
|
||||
|
||||
static inline bool sym_has_value(const struct symbol *sym)
|
||||
{
|
||||
|
@ -467,11 +467,6 @@ static void _menu_finalize(struct menu *parent, bool inside_choice)
|
||||
sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep);
|
||||
}
|
||||
for (menu = parent->list; menu; menu = menu->next) {
|
||||
if (sym && sym_is_choice(sym) &&
|
||||
menu->sym && !sym_is_choice_value(menu->sym)) {
|
||||
menu->sym->flags |= SYMBOL_CHOICEVAL;
|
||||
}
|
||||
|
||||
/*
|
||||
* This code serves two purposes:
|
||||
*
|
||||
|
@ -871,6 +871,11 @@ bool sym_is_changeable(const struct symbol *sym)
|
||||
return !sym_is_choice(sym) && sym->visible > sym->rev_dep.tri;
|
||||
}
|
||||
|
||||
bool sym_is_choice_value(const struct symbol *sym)
|
||||
{
|
||||
return !list_empty(&sym->choice_link);
|
||||
}
|
||||
|
||||
HASHTABLE_DEFINE(sym_hashtable, SYMBOL_HASHSIZE);
|
||||
|
||||
struct symbol *sym_lookup(const char *name, int flags)
|
||||
@ -908,6 +913,7 @@ struct symbol *sym_lookup(const char *name, int flags)
|
||||
symbol->type = S_UNKNOWN;
|
||||
symbol->flags = flags;
|
||||
INIT_LIST_HEAD(&symbol->menus);
|
||||
INIT_LIST_HEAD(&symbol->choice_link);
|
||||
|
||||
hash_add(sym_hashtable, &symbol->node, hash);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user