Skip to content

Commit 490f161

Browse files
yann-morin-1998michal42
authored andcommitted
Revert "kconfig: fix randomising choice entries in presence of KCONFIG_ALLCONFIG"
This reverts commit 8357b48. It breaks more stuff than it fixes. Reported-by: Fengguang Wu <[email protected]> Reported-by: Sedat Dilek <[email protected]> Signed-off-by: "Yann E. MORIN" <[email protected]> Cc: Fengguang Wu <[email protected]> Cc: Sedat Dilek <[email protected]> Cc: Sam Ravnborg <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Alexandre Bounine <[email protected]> Cc: Matt Porter <[email protected]> Signed-off-by: Michal Marek <[email protected]>
1 parent 8357b48 commit 490f161

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/kconfig/confdata.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ int conf_read_simple(const char *name, int def)
288288
for_all_symbols(i, sym) {
289289
sym->flags |= SYMBOL_CHANGED;
290290
sym->flags &= ~(def_flags|SYMBOL_VALID);
291+
if (sym_is_choice(sym))
292+
sym->flags |= def_flags;
291293
switch (sym->type) {
292294
case S_INT:
293295
case S_HEX:
@@ -377,13 +379,13 @@ int conf_read_simple(const char *name, int def)
377379
case mod:
378380
if (cs->def[def].tri == yes) {
379381
conf_warning("%s creates inconsistent choice state", sym->name);
382+
cs->flags &= ~def_flags;
380383
}
381384
break;
382385
case yes:
383386
if (cs->def[def].tri != no)
384387
conf_warning("override: %s changes choice state", sym->name);
385388
cs->def[def].val = sym;
386-
cs->flags |= def_flags;
387389
break;
388390
}
389391
cs->def[def].tri = EXPR_OR(cs->def[def].tri, sym->def[def].tri);
@@ -789,8 +791,6 @@ int conf_write(const char *name)
789791
sym_calc_value(sym);
790792
if (!(sym->flags & SYMBOL_WRITE))
791793
goto next;
792-
if (sym_is_choice_value(sym) && !menu_is_visible(menu->parent))
793-
goto next;
794794
sym->flags &= ~SYMBOL_WRITE;
795795

796796
conf_write_symbol(out, sym, &kconfig_printer_cb, NULL);

0 commit comments

Comments
 (0)