History

kconfig: change "modules" from sub-option to first-level attribute

Now "modules" is the only member of the "option" property. Remove "option", and move "modules" to the top level property.

Masahiro Yamada committed 5 years ago

Commit 6dd85ff1 parent ab838579 files · +13 −27Browse files

Showing the changes to scripts (7 of 9 files). Show all

Unified · Split

7 files
  1. scripts/kconfig/lexer.l +0 −1
  2. scripts/kconfig/lkc.h +0 −1
  3. scripts/kconfig/menu.c +0 −8
  4. scripts/kconfig/parser.y +5 −3
  5. scripts/kconfig/tests/choice/Kconfig +1 −1
  6. scripts/kconfig/tests/choice_value_with_m_dep/Kconfig +1 −1
  7. scripts/kconfig/tests/inter_choice/Kconfig +1 −1
scripts/kconfig/lexer.l+0−1
@@ -112,7 +112,6 @@ n [A-Za-z0-9_-] · 111 unmodified lines
112"menuconfig" return T_MENUCONFIG;112"menuconfig" return T_MENUCONFIG;
113"modules" return T_MODULES;113"modules" return T_MODULES;
114"on" return T_ON;114"on" return T_ON;
115"option" return T_OPTION;
116"optional" return T_OPTIONAL;115"optional" return T_OPTIONAL;
117"prompt" return T_PROMPT;116"prompt" return T_PROMPT;
118"range" return T_RANGE;117"range" return T_RANGE;
scripts/kconfig/lkc.h+0−1
@@ -95,7 +95,6 @@ void menu_add_visibility(struct expr *dep); · 94 unmodified lines
95struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);95struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
96void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);96void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
97void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);97void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
98void menu_add_option_modules(void);
99void menu_finalize(struct menu *parent);98void menu_finalize(struct menu *parent);
100void menu_set_type(int type);99void menu_set_type(int type);
101 100
scripts/kconfig/menu.c+0−8
@@ -211,14 +211,6 @@ void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep) · 210 unmodified lines
211 menu_add_prop(type, expr_alloc_symbol(sym), dep);211 menu_add_prop(type, expr_alloc_symbol(sym), dep);
212}212}
213 213
214void menu_add_option_modules(void)
215{
216 if (modules_sym)
217 zconf_error("symbol '%s' redefines option 'modules' already defined by symbol '%s'",
218 current_entry->sym->name, modules_sym->name);
219 modules_sym = current_entry->sym;
220}
221
222static int menu_validate_number(struct symbol *sym, struct symbol *sym2)214static int menu_validate_number(struct symbol *sym, struct symbol *sym2)
223{215{
224 return sym2->type == S_INT || sym2->type == S_HEX ||216 return sym2->type == S_INT || sym2->type == S_HEX ||
scripts/kconfig/parser.y+5−3
@@ -69,7 +69,6 @@ static struct menu *current_menu, *current_entry; · 68 unmodified lines
69%token T_MODULES69%token T_MODULES
70%token T_ON70%token T_ON
71%token T_OPEN_PAREN71%token T_OPEN_PAREN
72%token T_OPTION
73%token T_OPTIONAL72%token T_OPTIONAL
74%token T_PLUS_EQUAL73%token T_PLUS_EQUAL
75%token T_PROMPT74%token T_PROMPT
@@ -216,9 +215,12 @@ config_option: T_RANGE symbol symbol if_expr T_EOL · 140 unmodified lines
216 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());215 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
217};216};
218 217
219config_option: T_OPTION T_MODULES T_EOL218config_option: T_MODULES T_EOL
220{219{
221 menu_add_option_modules();220 if (modules_sym)
221 zconf_error("symbol '%s' redefines option 'modules' already defined by symbol '%s'",
222 current_entry->sym->name, modules_sym->name);
223 modules_sym = current_entry->sym;
222};224};
223 225
224/* choice entry */226/* choice entry */
scripts/kconfig/tests/choice/Kconfig+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2 2
3config MODULES3config MODULES
4 bool "Enable loadable module support"4 bool "Enable loadable module support"
5 option modules5 modules
6 default y6 default y
7 7
8choice8choice
scripts/kconfig/tests/choice_value_with_m_dep/Kconfig+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2 2
3config MODULES3config MODULES
4 def_bool y4 def_bool y
5 option modules5 modules
6 6
7config DEP7config DEP
8 tristate8 tristate
scripts/kconfig/tests/inter_choice/Kconfig+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
2 2
3config MODULES3config MODULES
4 def_bool y4 def_bool y
5 option modules5 modules
6 6
7choice7choice
8 prompt "Choice"8 prompt "Choice"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t