Commit 490f1617 authored by Yann E. MORIN's avatar Yann E. MORIN Committed by Michal Marek

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

This reverts commit 8357b485.

It breaks more stuff than it fixes.
Reported-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Reported-by: default avatarSedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 8357b485
...@@ -288,6 +288,8 @@ int conf_read_simple(const char *name, int def) ...@@ -288,6 +288,8 @@ int conf_read_simple(const char *name, int def)
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 @@ int conf_read_simple(const char *name, int def) ...@@ -377,13 +379,13 @@ int conf_read_simple(const char *name, int def)
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) ...@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment