* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: kbuild: explain why DEBUG_SECTION_MISMATCH is UNDEFINED kbuild: fix building vmlinux.o kbuild: allow -fstack-protector to take effect kconfig: fix select in combination with default
Showing the changes to scripts (1 of 3 files). Show all
Unified · Split
| @@ -298,22 +298,30 @@ void sym_calc_value(struct symbol *sym) · 297 unmodified lines | ||
| 298 | 298 | if (sym_is_choice_value(sym) && sym->visible == yes) { |
| 299 | 299 | prop = sym_get_choice_prop(sym); |
| 300 | 300 | newval.tri = (prop_get_symbol(prop)->curr.val == sym) ? yes : no; |
| 301 | − } else if (EXPR_OR(sym->visible, sym->rev_dep.tri) != no) { | |
| 302 | − sym->flags |= SYMBOL_WRITE; | |
| 303 | − if (sym_has_value(sym)) | |
| 304 | − newval.tri = sym->def[S_DEF_USER].tri; | |
| 305 | − else if (!sym_is_choice(sym)) { | |
| 306 | − prop = sym_get_default_prop(sym); | |
| 307 | − if (prop) | |
| 308 | − newval.tri = expr_calc_value(prop->expr); | |
| 301 | + } else { | |
| 302 | + if (sym->visible != no) { | |
| 303 | + /* if the symbol is visible use the user value | |
| 304 | + * if available, otherwise try the default value | |
| 305 | + */ | |
| 306 | + sym->flags |= SYMBOL_WRITE; | |
| 307 | + if (sym_has_value(sym)) { | |
| 308 | + newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri, | |
| 309 | + sym->visible); | |
| 310 | + goto calc_newval; | |
| 311 | + } | |
| 309 | 312 | } |
| 310 | − newval.tri = EXPR_OR(EXPR_AND(newval.tri, sym->visible), sym->rev_dep.tri); | |
| 311 | − } else if (!sym_is_choice(sym)) { | |
| 312 | − prop = sym_get_default_prop(sym); | |
| 313 | − if (prop) { | |
| 313 | + if (sym->rev_dep.tri != no) | |
| 314 | 314 | sym->flags |= SYMBOL_WRITE; |
| 315 | − newval.tri = expr_calc_value(prop->expr); | |
| 315 | + if (!sym_is_choice(sym)) { | |
| 316 | + prop = sym_get_default_prop(sym); | |
| 317 | + if (prop) { | |
| 318 | + sym->flags |= SYMBOL_WRITE; | |
| 319 | + newval.tri = EXPR_AND(expr_calc_value(prop->expr), | |
| 320 | + prop->visible.tri); | |
| 321 | + } | |
| 316 | 322 | } |
| 323 | + calc_newval: | |
| 324 | + newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri); | |
| 317 | 325 | } |
| 318 | 326 | if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN) |
| 319 | 327 | newval.tri = yes; |