Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"

This reverts commit 422c809f03.
It causes more harm than it solves issues.

Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Michal Marek <mmarek@suse.cz>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Greg KH <greg@kroah.com>
This commit is contained in:
Yann E. MORIN 2013-04-26 22:41:32 +02:00
parent e43956e607
commit 23a5dfdad2
1 changed files with 3 additions and 4 deletions

View File

@ -288,6 +288,8 @@ load:
for_all_symbols(i, sym) { for_all_symbols(i, sym) {
sym->flags |= SYMBOL_CHANGED; sym->flags |= SYMBOL_CHANGED;
sym->flags &= ~(def_flags|SYMBOL_VALID); sym->flags &= ~(def_flags|SYMBOL_VALID);
if (sym_is_choice(sym))
sym->flags |= def_flags;
switch (sym->type) { switch (sym->type) {
case S_INT: case S_INT:
case S_HEX: case S_HEX:
@ -377,13 +379,13 @@ setsym:
case mod: case mod:
if (cs->def[def].tri == yes) { if (cs->def[def].tri == yes) {
conf_warning("%s creates inconsistent choice state", sym->name); conf_warning("%s creates inconsistent choice state", sym->name);
cs->flags &= ~def_flags;
} }
break; break;
case yes: case yes:
if (cs->def[def].tri != no) if (cs->def[def].tri != no)
conf_warning("override: %s changes choice state", sym->name); conf_warning("override: %s changes choice state", sym->name);
cs->def[def].val = sym; cs->def[def].val = sym;
cs->flags |= def_flags;
break; break;
} }
cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri); cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri);
@ -789,8 +791,6 @@ int conf_write(const char *name)
sym_calc_value(sym); sym_calc_value(sym);
if (!(sym->flags & SYMBOL_WRITE)) if (!(sym->flags & SYMBOL_WRITE))
goto next; goto next;
if (sym_is_choice_value(sym) && !menu_is_visible(menu->parent))
goto next;
sym->flags &= ~SYMBOL_WRITE; sym->flags &= ~SYMBOL_WRITE;
conf_write_symbol(out, sym, &kconfig_printer_cb, NULL); conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);
@ -1077,7 +1077,6 @@ static void randomize_choice_values(struct symbol *csym)
else { else {
sym->def[S_DEF_USER].tri = no; sym->def[S_DEF_USER].tri = no;
} }
sym->flags &= ~(SYMBOL_VALID);
} }
csym->flags |= SYMBOL_DEF_USER; csym->flags |= SYMBOL_DEF_USER;
/* clear VALID to get value calculated */ /* clear VALID to get value calculated */