mirror of https://github.com/torvalds/linux.git
kconfig: do not clear SYMBOL_VALID when reading include/config/auto.conf
When conf_read_simple() is called with S_DEF_AUTO, it is meant to read previous symbol values from include/config/auto.conf to determine which include/config/* files should be touched. This process should not modify the current symbol status in any way. However, conf_touch_deps() currently invalidates all symbol values and recalculates them, which is totally unneeded. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
6c3fb0bb4d
commit
226ac19c21
|
|
@ -385,7 +385,7 @@ int conf_read_simple(const char *name, int def)
|
||||||
|
|
||||||
def_flags = SYMBOL_DEF << def;
|
def_flags = SYMBOL_DEF << def;
|
||||||
for_all_symbols(sym) {
|
for_all_symbols(sym) {
|
||||||
sym->flags &= ~(def_flags|SYMBOL_VALID);
|
sym->flags &= ~def_flags;
|
||||||
switch (sym->type) {
|
switch (sym->type) {
|
||||||
case S_INT:
|
case S_INT:
|
||||||
case S_HEX:
|
case S_HEX:
|
||||||
|
|
@ -398,7 +398,11 @@ int conf_read_simple(const char *name, int def)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
expr_invalidate_all();
|
if (def == S_DEF_USER) {
|
||||||
|
for_all_symbols(sym)
|
||||||
|
sym->flags &= ~SYMBOL_VALID;
|
||||||
|
expr_invalidate_all();
|
||||||
|
}
|
||||||
|
|
||||||
while (getline_stripped(&line, &line_asize, in) != -1) {
|
while (getline_stripped(&line, &line_asize, in) != -1) {
|
||||||
struct menu *choice;
|
struct menu *choice;
|
||||||
|
|
@ -464,6 +468,9 @@ int conf_read_simple(const char *name, int def)
|
||||||
if (conf_set_sym_val(sym, def, def_flags, val))
|
if (conf_set_sym_val(sym, def, def_flags, val))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (def != S_DEF_USER)
|
||||||
|
continue;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this is a choice member, give it the highest priority.
|
* If this is a choice member, give it the highest priority.
|
||||||
* If conflicting CONFIG options are given from an input file,
|
* If conflicting CONFIG options are given from an input file,
|
||||||
|
|
@ -967,10 +974,8 @@ static int conf_touch_deps(void)
|
||||||
depfile_path[depfile_prefix_len] = 0;
|
depfile_path[depfile_prefix_len] = 0;
|
||||||
|
|
||||||
conf_read_simple(name, S_DEF_AUTO);
|
conf_read_simple(name, S_DEF_AUTO);
|
||||||
sym_calc_value(modules_sym);
|
|
||||||
|
|
||||||
for_all_symbols(sym) {
|
for_all_symbols(sym) {
|
||||||
sym_calc_value(sym);
|
|
||||||
if (sym_is_choice(sym))
|
if (sym_is_choice(sym))
|
||||||
continue;
|
continue;
|
||||||
if (sym->flags & SYMBOL_WRITE) {
|
if (sym->flags & SYMBOL_WRITE) {
|
||||||
|
|
@ -1084,12 +1089,12 @@ int conf_write_autoconf(int overwrite)
|
||||||
if (ret)
|
if (ret)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (conf_touch_deps())
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
for_all_symbols(sym)
|
for_all_symbols(sym)
|
||||||
sym_calc_value(sym);
|
sym_calc_value(sym);
|
||||||
|
|
||||||
|
if (conf_touch_deps())
|
||||||
|
return 1;
|
||||||
|
|
||||||
ret = __conf_write_autoconf(conf_get_autoheader_name(),
|
ret = __conf_write_autoconf(conf_get_autoheader_name(),
|
||||||
print_symbol_for_c,
|
print_symbol_for_c,
|
||||||
&comment_style_c);
|
&comment_style_c);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue