This flag is set to symbols that are not intended to be written to the .config file. Since commit b75b0a819af9 ("kconfig: change defconfig_list option to environment variable"), SYMBOL_NO_WRITE is only set to choices. Therefore, (sym->flags & SYMBOL_NO_WRITE) is equivalent to sym_is_choice(sym). This flag is no longer necessary.
Showing the changes to scripts (5 of 5 files). Show all
Unified · Split
| @@ -502,7 +502,7 @@ int conf_read(const char *name) · 501 unmodified lines | ||
| 502 | 502 | |
| 503 | 503 | for_all_symbols(sym) { |
| 504 | 504 | sym_calc_value(sym); |
| 505 | − if (sym_is_choice(sym) || (sym->flags & SYMBOL_NO_WRITE)) | |
| 505 | + if (sym_is_choice(sym)) | |
| 506 | 506 | continue; |
| 507 | 507 | if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { |
| 508 | 508 | /* check that calculated value agrees with saved value */ |
| @@ -1007,7 +1007,7 @@ static int conf_touch_deps(void) · 498 unmodified lines | ||
| 1007 | 1007 | |
| 1008 | 1008 | for_all_symbols(sym) { |
| 1009 | 1009 | sym_calc_value(sym); |
| 1010 | − if ((sym->flags & SYMBOL_NO_WRITE) || !sym->name) | |
| 1010 | + if (sym_is_choice(sym)) | |
| 1011 | 1011 | continue; |
| 1012 | 1012 | if (sym->flags & SYMBOL_WRITE) { |
| 1013 | 1013 | if (sym->flags & SYMBOL_DEF_AUTO) { |
| @@ -135,7 +135,6 @@ struct symbol { · 134 unmodified lines | ||
| 135 | 135 | #define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */ |
| 136 | 136 | #define SYMBOL_CHANGED 0x0400 /* ? */ |
| 137 | 137 | #define SYMBOL_WRITTEN 0x0800 /* track info to avoid double-write to .config */ |
| 138 | −#define SYMBOL_NO_WRITE 0x1000 /* Symbol for internal use only; it will not be written */ | |
| 139 | 138 | #define SYMBOL_CHECKED 0x2000 /* used during dependency checking */ |
| 140 | 139 | #define SYMBOL_WARNED 0x8000 /* warning has been issued */ |
| 141 | 140 | |
| @@ -91,8 +91,6 @@ static const char *dbg_sym_flags(int val) · 90 unmodified lines | ||
| 91 | 91 | strcat(buf, "write/"); |
| 92 | 92 | if (val & SYMBOL_CHANGED) |
| 93 | 93 | strcat(buf, "changed/"); |
| 94 | − if (val & SYMBOL_NO_WRITE) | |
| 95 | − strcat(buf, "no_write/"); | |
| 96 | 94 | |
| 97 | 95 | buf[strlen(buf) - 1] = '\0'; |
| 98 | 96 | |
| @@ -222,7 +222,7 @@ config_option: T_MODULES T_EOL · 221 unmodified lines | ||
| 222 | 222 | choice: T_CHOICE T_EOL |
| 223 | 223 | { |
| 224 | 224 | struct symbol *sym = sym_lookup(NULL, 0); |
| 225 | − sym->flags |= SYMBOL_NO_WRITE; | |
| 225 | + | |
| 226 | 226 | menu_add_entry(sym); |
| 227 | 227 | menu_add_expr(P_CHOICE, NULL, NULL); |
| 228 | 228 | printd(DEBUG_PARSE, "%s:%d:choice\n", cur_filename, cur_lineno); |
| @@ -466,10 +466,9 @@ void sym_calc_value(struct symbol *sym) · 465 unmodified lines | ||
| 466 | 466 | if (sym->flags & SYMBOL_CHANGED) |
| 467 | 467 | sym_set_changed(choice_sym); |
| 468 | 468 | } |
| 469 | − } | |
| 470 | 469 | |
| 471 | − if (sym->flags & SYMBOL_NO_WRITE) | |
| 472 | 470 | sym->flags &= ~SYMBOL_WRITE; |
| 471 | + } | |
| 473 | 472 | |
| 474 | 473 | if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES) |
| 475 | 474 | set_all_choice_values(sym); |