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: change sym_choice_default() to take the choice menu

Change the argument of sym_choice_default() to ease further cleanups.

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

+6 -6
+1 -1
scripts/kconfig/confdata.c
··· 779 779 if (choice) { 780 780 struct symbol *ds; 781 781 782 - ds = sym_choice_default(choice->sym); 782 + ds = sym_choice_default(choice); 783 783 if (sym == ds && sym_get_tristate_value(sym) == yes) 784 784 continue; 785 785 }
+1 -1
scripts/kconfig/lkc.h
··· 109 109 110 110 /* symbol.c */ 111 111 void sym_clear_all_valid(void); 112 - struct symbol *sym_choice_default(struct symbol *sym); 112 + struct symbol *sym_choice_default(struct menu *choice); 113 113 struct symbol *sym_calc_choice(struct menu *choice); 114 114 struct property *sym_get_range_prop(struct symbol *sym); 115 115 const char *sym_get_string_default(struct symbol *sym);
+4 -4
scripts/kconfig/symbol.c
··· 255 255 * Next locate the first visible choice value 256 256 * Return NULL if none was found 257 257 */ 258 - struct symbol *sym_choice_default(struct symbol *sym) 258 + struct symbol *sym_choice_default(struct menu *choice) 259 259 { 260 260 struct symbol *def_sym; 261 261 struct property *prop; 262 262 struct expr *e; 263 263 264 264 /* any of the defaults visible? */ 265 - for_all_defaults(sym, prop) { 265 + for_all_defaults(choice->sym, prop) { 266 266 prop->visible.tri = expr_calc_value(prop->visible.expr); 267 267 if (prop->visible.tri == no) 268 268 continue; ··· 272 272 } 273 273 274 274 /* just get the first visible value */ 275 - prop = sym_get_choice_prop(sym); 275 + prop = sym_get_choice_prop(choice->sym); 276 276 expr_list_for_each_sym(prop->expr, e, def_sym) 277 277 if (def_sym->visible != no) 278 278 return def_sym; ··· 312 312 * explicitly set to 'n'. 313 313 */ 314 314 if (!res) { 315 - res = sym_choice_default(choice->sym); 315 + res = sym_choice_default(choice); 316 316 if (res && sym_has_value(res) && res->def[S_DEF_USER].tri == no) 317 317 res = NULL; 318 318 }