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
112112 "menuconfig" return T_MENUCONFIG;
113113 "modules" return T_MODULES;
114114 "on" return T_ON;
115−"option" return T_OPTION;
116115 "optional" return T_OPTIONAL;
117116 "prompt" return T_PROMPT;
118117 "range" return T_RANGE;
scripts/kconfig/lkc.h+0−1
@@ -95,7 +95,6 @@ void menu_add_visibility(struct expr *dep); · 94 unmodified lines
9595 struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
9696 void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep);
9797 void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep);
98−void menu_add_option_modules(void);
9998 void menu_finalize(struct menu *parent);
10099 void menu_set_type(int type);
101100
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
211211 menu_add_prop(type, expr_alloc_symbol(sym), dep);
212212 }
213213
214−void 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−
222214 static int menu_validate_number(struct symbol *sym, struct symbol *sym2)
223215 {
224216 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
6969 %token T_MODULES
7070 %token T_ON
7171 %token T_OPEN_PAREN
72−%token T_OPTION
7372 %token T_OPTIONAL
7473 %token T_PLUS_EQUAL
7574 %token T_PROMPT
@@ -216,9 +215,12 @@ config_option: T_RANGE symbol symbol if_expr T_EOL · 140 unmodified lines
216215 printd(DEBUG_PARSE, "%s:%d:range\n", zconf_curname(), zconf_lineno());
217216 };
218217
219−config_option: T_OPTION T_MODULES T_EOL
218+config_option: T_MODULES T_EOL
220219 {
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;
222224 };
223225
224226 /* choice entry */
scripts/kconfig/tests/choice/Kconfig+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22
33 config MODULES
44 bool "Enable loadable module support"
5− option modules
5+ modules
66 default y
77
88 choice
scripts/kconfig/tests/choice_value_with_m_dep/Kconfig+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22
33 config MODULES
44 def_bool y
5− option modules
5+ modules
66
77 config DEP
88 tristate
scripts/kconfig/tests/inter_choice/Kconfig+1−1
@@ -2,7 +2,7 @@ · 1 unmodified line
22
33 config MODULES
44 def_bool y
5− option modules
5+ modules
66
77 choice
88 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