aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig
diff options
context:
space:
mode:
authorDirk Gouders <dirk@gouders.net>2018-07-03 08:43:31 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-07-17 12:18:09 -0400
commit693359f7ac9012778590a370d076b13db704255e (patch)
tree31e2791c6e131a20ce6cad464c142d6fcccdb82c /scripts/kconfig
parent4ab3b80159d4db63b902ef635d4b5e882911b2da (diff)
kconfig: rename SYMBOL_AUTO to SYMBOL_NO_WRITE
Over time, the use of the flag SYMBOL_AUTO changed from initially marking three automatically generated symbols ARCH, KERNELRELEASE and UNAME_RELEASE to today's effect of protecting symbols from being written out. Currently, only symbols of type CHOICE and those with option defconf_list set have that flag set. Reflect that change in semantics in the flag's name. Signed-off-by: Dirk Gouders <dirk@gouders.net> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r--scripts/kconfig/confdata.c4
-rw-r--r--scripts/kconfig/expr.h2
-rw-r--r--scripts/kconfig/gconf.c4
-rw-r--r--scripts/kconfig/menu.c2
-rw-r--r--scripts/kconfig/symbol.c2
-rw-r--r--scripts/kconfig/zconf.y2
6 files changed, 8 insertions, 8 deletions
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 39e20974f4a3..d1216e4ade2f 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -397,7 +397,7 @@ int conf_read(const char *name)
397 397
398 for_all_symbols(i, sym) { 398 for_all_symbols(i, sym) {
399 sym_calc_value(sym); 399 sym_calc_value(sym);
400 if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO)) 400 if (sym_is_choice(sym) || (sym->flags & SYMBOL_NO_WRITE))
401 continue; 401 continue;
402 if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { 402 if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) {
403 /* check that calculated value agrees with saved value */ 403 /* check that calculated value agrees with saved value */
@@ -832,7 +832,7 @@ static int conf_split_config(void)
832 res = 0; 832 res = 0;
833 for_all_symbols(i, sym) { 833 for_all_symbols(i, sym) {
834 sym_calc_value(sym); 834 sym_calc_value(sym);
835 if ((sym->flags & SYMBOL_AUTO) || !sym->name) 835 if ((sym->flags & SYMBOL_NO_WRITE) || !sym->name)
836 continue; 836 continue;
837 if (sym->flags & SYMBOL_WRITE) { 837 if (sym->flags & SYMBOL_WRITE) {
838 if (sym->flags & SYMBOL_DEF_AUTO) { 838 if (sym->flags & SYMBOL_DEF_AUTO) {
diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h
index f63b41b0dd49..84a5199bb46b 100644
--- a/scripts/kconfig/expr.h
+++ b/scripts/kconfig/expr.h
@@ -141,7 +141,7 @@ struct symbol {
141#define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */ 141#define SYMBOL_OPTIONAL 0x0100 /* choice is optional - values can be 'n' */
142#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */ 142#define SYMBOL_WRITE 0x0200 /* write symbol to file (KCONFIG_CONFIG) */
143#define SYMBOL_CHANGED 0x0400 /* ? */ 143#define SYMBOL_CHANGED 0x0400 /* ? */
144#define SYMBOL_AUTO 0x1000 /* value from environment variable */ 144#define SYMBOL_NO_WRITE 0x1000 /* Symbol for internal use only; it will not be written */
145#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */ 145#define SYMBOL_CHECKED 0x2000 /* used during dependency checking */
146#define SYMBOL_WARNED 0x8000 /* warning has been issued */ 146#define SYMBOL_WARNED 0x8000 /* warning has been issued */
147 147
diff --git a/scripts/kconfig/gconf.c b/scripts/kconfig/gconf.c
index 610c4ab54d76..a9e48cc7b50a 100644
--- a/scripts/kconfig/gconf.c
+++ b/scripts/kconfig/gconf.c
@@ -101,8 +101,8 @@ const char *dbg_sym_flags(int val)
101 strcat(buf, "write/"); 101 strcat(buf, "write/");
102 if (val & SYMBOL_CHANGED) 102 if (val & SYMBOL_CHANGED)
103 strcat(buf, "changed/"); 103 strcat(buf, "changed/");
104 if (val & SYMBOL_AUTO) 104 if (val & SYMBOL_NO_WRITE)
105 strcat(buf, "auto/"); 105 strcat(buf, "no_write/");
106 106
107 buf[strlen(buf) - 1] = '\0'; 107 buf[strlen(buf) - 1] = '\0';
108 108
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index 379a119dcd1e..4cf15d449c05 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -212,7 +212,7 @@ void menu_add_option(int token, char *arg)
212 sym_defconfig_list = current_entry->sym; 212 sym_defconfig_list = current_entry->sym;
213 else if (sym_defconfig_list != current_entry->sym) 213 else if (sym_defconfig_list != current_entry->sym)
214 zconf_error("trying to redefine defconfig symbol"); 214 zconf_error("trying to redefine defconfig symbol");
215 sym_defconfig_list->flags |= SYMBOL_AUTO; 215 sym_defconfig_list->flags |= SYMBOL_NO_WRITE;
216 break; 216 break;
217 case T_OPT_ALLNOCONFIG_Y: 217 case T_OPT_ALLNOCONFIG_Y:
218 current_entry->sym->flags |= SYMBOL_ALLNOCONFIG_Y; 218 current_entry->sym->flags |= SYMBOL_ALLNOCONFIG_Y;
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 7c9a88e91cfa..869a5e8e87a5 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -463,7 +463,7 @@ void sym_calc_value(struct symbol *sym)
463 } 463 }
464 } 464 }
465 465
466 if (sym->flags & SYMBOL_AUTO) 466 if (sym->flags & SYMBOL_NO_WRITE)
467 sym->flags &= ~SYMBOL_WRITE; 467 sym->flags &= ~SYMBOL_WRITE;
468 468
469 if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES) 469 if (sym->flags & SYMBOL_NEED_SET_CHOICE_VALUES)
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index 4b68272ebdb9..96081aa0fef0 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -265,7 +265,7 @@ symbol_option_arg:
265choice: T_CHOICE word_opt T_EOL 265choice: T_CHOICE word_opt T_EOL
266{ 266{
267 struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE); 267 struct symbol *sym = sym_lookup($2, SYMBOL_CHOICE);
268 sym->flags |= SYMBOL_AUTO; 268 sym->flags |= SYMBOL_NO_WRITE;
269 menu_add_entry(sym); 269 menu_add_entry(sym);
270 menu_add_expr(P_CHOICE, NULL, NULL); 270 menu_add_expr(P_CHOICE, NULL, NULL);
271 free($2); 271 free($2);