Skip to content

Commit a7c79cf

Browse files
committed
kconfig: remove SYMBOL_NO_WRITE flag
This flag is set to symbols that are not intended to be written to the .config file. Since commit b75b0a8 ("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. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
1 parent aba0915 commit a7c79cf

File tree

5 files changed

+4
-8
lines changed

5 files changed

+4
-8
lines changed

scripts/kconfig/confdata.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ int conf_read(const char *name)
502502

503503
for_all_symbols(sym) {
504504
sym_calc_value(sym);
505-
if (sym_is_choice(sym) || (sym->flags & SYMBOL_NO_WRITE))
505+
if (sym_is_choice(sym))
506506
continue;
507507
if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) {
508508
/* check that calculated value agrees with saved value */
@@ -1007,7 +1007,7 @@ static int conf_touch_deps(void)
10071007

10081008
for_all_symbols(sym) {
10091009
sym_calc_value(sym);
1010-
if ((sym->flags & SYMBOL_NO_WRITE) || !sym->name)
1010+
if (sym_is_choice(sym))
10111011
continue;
10121012
if (sym->flags & SYMBOL_WRITE) {
10131013
if (sym->flags & SYMBOL_DEF_AUTO) {

scripts/kconfig/expr.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ struct symbol {
135135
#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
136136
#define SYMBOL_CHANGED 0x0400 /* ? */
137137
#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 */
139138
#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */
140139
#define SYMBOL_WARNED 0x8000 /* warning has been issued */
141140

scripts/kconfig/gconf.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ static const char *dbg_sym_flags(int val)
9191
strcat(buf, "write/");
9292
if (val & SYMBOL_CHANGED)
9393
strcat(buf, "changed/");
94-
if (val & SYMBOL_NO_WRITE)
95-
strcat(buf, "no_write/");
9694

9795
buf[strlen(buf) - 1] = '\0';
9896

scripts/kconfig/parser.y

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ config_option: T_MODULES T_EOL
222222
choice: T_CHOICE T_EOL
223223
{
224224
struct symbol *sym = sym_lookup(NULL, 0);
225-
sym->flags |= SYMBOL_NO_WRITE;
225+
226226
menu_add_entry(sym);
227227
menu_add_expr(P_CHOICE, NULL, NULL);
228228
printd(DEBUG_PARSE, "%s:%d:choice\n", cur_filename, cur_lineno);

scripts/kconfig/symbol.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,10 +466,9 @@ void sym_calc_value(struct symbol *sym)
466466
if (sym->flags & SYMBOL_CHANGED)
467467
sym_set_changed(choice_sym);
468468
}
469-
}
470469

471-
if (sym->flags & SYMBOL_NO_WRITE)
472470
sym->flags &= ~SYMBOL_WRITE;
471+
}
473472

474473
if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES)
475474
set_all_choice_values(sym);

0 commit comments

Comments
 (0)