Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+8 -11
-1
scripts/kconfig/expr.h
··· 131 131 132 132 #define SYMBOL_CONST 0x0001 /* symbol is const */ 133 133 #define SYMBOL_CHECK 0x0008 /* used during dependency checking */ 134 - #define SYMBOL_CHOICEVAL 0x0020 /* used as a value in a choice block */ 135 134 #define SYMBOL_VALID 0x0080 /* set when symbol.curr is calculated */ 136 135 #define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */ 137 136 #define SYMBOL_WRITTEN 0x0800 /* track info to avoid double-write to .config */
+1 -1
scripts/kconfig/gconf.c
··· 1070 1070 row[COL_BTNVIS] = GINT_TO_POINTER(FALSE); 1071 1071 return row; 1072 1072 } 1073 - if (sym->flags & SYMBOL_CHOICEVAL) 1073 + if (sym_is_choice_value(sym)) 1074 1074 row[COL_BTNRAD] = GINT_TO_POINTER(TRUE); 1075 1075 1076 1076 stype = sym_get_type(sym);
+1 -4
scripts/kconfig/lkc.h
··· 128 128 return sym->name == NULL; 129 129 } 130 130 131 - static inline bool sym_is_choice_value(const struct symbol *sym) 132 - { 133 - return sym->flags & SYMBOL_CHOICEVAL ? true : false; 134 - } 131 + bool sym_is_choice_value(const struct symbol *sym); 135 132 136 133 static inline bool sym_has_value(const struct symbol *sym) 137 134 {
-5
scripts/kconfig/menu.c
··· 467 467 sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep); 468 468 } 469 469 for (menu = parent->list; menu; menu = menu->next) { 470 - if (sym && sym_is_choice(sym) && 471 - menu->sym && !sym_is_choice_value(menu->sym)) { 472 - menu->sym->flags |= SYMBOL_CHOICEVAL; 473 - } 474 - 475 470 /* 476 471 * This code serves two purposes: 477 472 *
+6
scripts/kconfig/symbol.c
··· 871 871 return !sym_is_choice(sym) && sym->visible > sym->rev_dep.tri; 872 872 } 873 873 874 + bool sym_is_choice_value(const struct symbol *sym) 875 + { 876 + return !list_empty(&sym->choice_link); 877 + } 878 + 874 879 HASHTABLE_DEFINE(sym_hashtable, SYMBOL_HASHSIZE); 875 880 876 881 struct symbol *sym_lookup(const char *name, int flags) ··· 913 908 symbol->type = S_UNKNOWN; 914 909 symbol->flags = flags; 915 910 INIT_LIST_HEAD(&symbol->menus); 911 + INIT_LIST_HEAD(&symbol->choice_link); 916 912 917 913 hash_add(sym_hashtable, &symbol->node, hash); 918 914