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

Configure Feed

Select the types of activity you want to include in your feed.

kconfig: remove P_CHOICE property

P_CHOICE is a pseudo property used to link a choice with its members.

There is no more code relying on this, except for some debug code.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

+3 -37
+1 -3
scripts/kconfig/expr.h
··· 167 167 P_COMMENT, /* text associated with a comment */ 168 168 P_MENU, /* prompt associated with a menu or menuconfig symbol */ 169 169 P_DEFAULT, /* default y */ 170 - P_CHOICE, /* choice value */ 171 170 P_SELECT, /* select BAR */ 172 171 P_IMPLY, /* imply BAR */ 173 172 P_RANGE, /* range 7..100 (for a symbol) */ ··· 180 181 struct expr_value visible; 181 182 struct expr *expr; /* the optional conditional part of the property */ 182 183 struct menu *menu; /* the menu the property are associated with 183 - * valid for: P_SELECT, P_RANGE, P_CHOICE, 184 + * valid for: P_SELECT, P_RANGE, 184 185 * P_PROMPT, P_DEFAULT, P_MENU, P_COMMENT */ 185 186 const char *filename; /* what file was this property defined */ 186 187 int lineno; /* what lineno was this property defined */ ··· 190 191 for (st = sym->prop; st; st = st->next) \ 191 192 if (st->type == (tok)) 192 193 #define for_all_defaults(sym, st) for_all_properties(sym, st, P_DEFAULT) 193 - #define for_all_choices(sym, st) for_all_properties(sym, st, P_CHOICE) 194 194 #define for_all_prompts(sym, st) \ 195 195 for (st = sym->prop; st; st = st->next) \ 196 196 if (st->text)
-1
scripts/kconfig/lkc_proto.h
··· 34 34 bool sym_string_within_range(struct symbol *sym, const char *str); 35 35 bool sym_set_string_value(struct symbol *sym, const char *newval); 36 36 bool sym_is_changeable(struct symbol *sym); 37 - struct property * sym_get_choice_prop(struct symbol *sym); 38 37 struct menu *sym_get_choice_menu(struct symbol *sym); 39 38 const char * sym_get_string_value(struct symbol *sym); 40 39
+1 -8
scripts/kconfig/menu.c
··· 306 306 struct menu *menu, *last_menu; 307 307 struct symbol *sym; 308 308 struct property *prop; 309 - struct expr *parentdep, *basedep, *dep, *dep2, **ep; 309 + struct expr *parentdep, *basedep, *dep, *dep2; 310 310 311 311 sym = parent->sym; 312 312 if (parent->list) { ··· 490 490 for (menu = parent->list; menu; menu = menu->next) { 491 491 if (sym && sym_is_choice(sym) && 492 492 menu->sym && !sym_is_choice_value(menu->sym)) { 493 - current_entry = menu; 494 493 menu->sym->flags |= SYMBOL_CHOICEVAL; 495 - menu_add_symbol(P_CHOICE, sym, NULL); 496 - prop = sym_get_choice_prop(sym); 497 - for (ep = &prop->expr; *ep; ep = &(*ep)->left.expr) 498 - ; 499 - *ep = expr_alloc_one(E_LIST, NULL); 500 - (*ep)->right.sym = menu->sym; 501 494 } 502 495 503 496 /*
-4
scripts/kconfig/parser.y
··· 241 241 struct symbol *sym = sym_lookup(NULL, 0); 242 242 243 243 menu_add_entry(sym); 244 - menu_add_expr(P_CHOICE, NULL, NULL); 245 244 menu_set_type(S_BOOLEAN); 246 245 INIT_LIST_HEAD(&current_entry->choice_members); 247 246 ··· 694 695 expr_fprint(prop->visible.expr, out); 695 696 } 696 697 fputc('\n', out); 697 - break; 698 - case P_CHOICE: 699 - fputs(" #choice value\n", out); 700 698 break; 701 699 case P_SELECT: 702 700 fputs( " select ", out);
-8
scripts/kconfig/qconf.cc
··· 1101 1101 &stream, E_NONE); 1102 1102 stream << "<br>"; 1103 1103 break; 1104 - case P_CHOICE: 1105 - if (sym_is_choice(sym)) { 1106 - stream << "choice: "; 1107 - expr_print(prop->expr, expr_print_help, 1108 - &stream, E_NONE); 1109 - stream << "<br>"; 1110 - } 1111 - break; 1112 1104 default: 1113 1105 stream << "unknown property: "; 1114 1106 stream << prop_get_type_name(prop->type);
+1 -13
scripts/kconfig/symbol.c
··· 68 68 return "???"; 69 69 } 70 70 71 - struct property *sym_get_choice_prop(struct symbol *sym) 72 - { 73 - struct property *prop; 74 - 75 - for_all_choices(sym, prop) 76 - return prop; 77 - return NULL; 78 - } 79 - 80 71 /** 81 72 * sym_get_choice_menu - get the parent choice menu if present 82 73 * ··· 1216 1225 stack.expr = NULL; 1217 1226 1218 1227 for (prop = sym->prop; prop; prop = prop->next) { 1219 - if (prop->type == P_CHOICE || prop->type == P_SELECT || 1220 - prop->type == P_IMPLY) 1228 + if (prop->type == P_SELECT || prop->type == P_IMPLY) 1221 1229 continue; 1222 1230 stack.prop = prop; 1223 1231 sym2 = sym_check_expr_deps(prop->visible.expr); ··· 1333 1343 return "menu"; 1334 1344 case P_DEFAULT: 1335 1345 return "default"; 1336 - case P_CHOICE: 1337 - return "choice"; 1338 1346 case P_SELECT: 1339 1347 return "select"; 1340 1348 case P_IMPLY: