From 4b0e02becffce2e69a2621cfef61790c62a6b016 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN" Date: Fri, 26 Apr 2013 22:41:32 +0200 Subject: [PATCH] Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG" This reverts commit 422c809f03f043d0950d8362214818e956a9daee. It causes more harm than it solves issues. Reported-by: Sedat Dilek Reported-by: Arnd Bergmann Signed-off-by: "Yann E. MORIN" Tested-by: Sedat Dilek Cc: Sedat Dilek Cc: Arnd Bergmann Cc: Michal Marek Cc: Sam Ravnborg Cc: Stephen Rothwell Cc: Thomas Petazzoni Cc: Greg KH Signed-off-by: Christian Lamparter --- config/confdata.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/config/confdata.c b/config/confdata.c index 7976da1..b882b56 100644 --- a/config/confdata.c +++ b/config/confdata.c @@ -288,6 +288,8 @@ load: for_all_symbols(i, sym) { sym->flags |= SYMBOL_CHANGED; sym->flags &= ~(def_flags|SYMBOL_VALID); + if (sym_is_choice(sym)) + sym->flags |= def_flags; switch (sym->type) { case S_INT: case S_HEX: @@ -377,13 +379,13 @@ setsym: case mod: if (cs->def[def].tri == yes) { conf_warning("%s creates inconsistent choice state", sym->name); + cs->flags &= ~def_flags; } break; case yes: if (cs->def[def].tri != no) conf_warning("override: %s changes choice state", sym->name); cs->def[def].val = sym; - cs->flags |= def_flags; break; } cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); @@ -835,8 +837,6 @@ int conf_write(const char *name) sym_calc_value(sym); if (!(sym->flags & SYMBOL_WRITE)) goto next; - if (sym_is_choice_value(sym) && !menu_is_visible(menu->parent)) - goto next; sym->flags &= ~SYMBOL_WRITE; conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); @@ -1140,7 +1140,6 @@ static void randomize_choice_values(struct symbol *csym) else { sym->def[S_DEF_USER].tri = no; } - sym->flags &= ~(SYMBOL_VALID); } csym->flags |= SYMBOL_DEF_USER; /* clear VALID to get value calculated */ -- 2.31.1