diff options
author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-10-08 18:14:48 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-01-21 10:49:28 -0500 |
commit | df60f4b92d3d0b0b91267532ea2584e3b6b58b2f (patch) | |
tree | a36d7160de062b7339494d362044d6e208e5c9f8 /scripts/kconfig | |
parent | 0735f7e5def2ab4158aac8d35f3661e8819dc232 (diff) |
kconfig: Remove menu_end_entry()
menu_end_entry() is empty and completely unused as far as I can tell:
$ git log -G menu_end_entry --oneline
a02f057 [PATCH] kconfig: improve error handling in the parser
1da177e Linux-2.6.12-rc2
Last one is the initial Git commit, where menu_end_entry() is empty as
well. I couldn't find anything that redefined it on Google either.
It might be a debugging helper for setting a breakpoint after each
config, menuconfig, and comment is parsed. IMO it hurts more than it
helps in that case by making the parsing code look more complicated at a
glance than it really is, and I suspect it doesn't get used much.
Tested by running the Kconfiglib test suite, which indirectly verifies
that the .config files generated by the C implementation for each
defconfig file in the kernel stays the same.
Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/kconfig')
-rw-r--r-- | scripts/kconfig/lkc.h | 1 | ||||
-rw-r--r-- | scripts/kconfig/menu.c | 5 | ||||
-rw-r--r-- | scripts/kconfig/zconf.y | 6 |
3 files changed, 1 insertions, 11 deletions
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h index cdcbe43e87b3..16cb62b92650 100644 --- a/scripts/kconfig/lkc.h +++ b/scripts/kconfig/lkc.h | |||
@@ -100,7 +100,6 @@ void menu_warn(struct menu *menu, const char *fmt, ...); | |||
100 | struct menu *menu_add_menu(void); | 100 | struct menu *menu_add_menu(void); |
101 | void menu_end_menu(void); | 101 | void menu_end_menu(void); |
102 | void menu_add_entry(struct symbol *sym); | 102 | void menu_add_entry(struct symbol *sym); |
103 | void menu_end_entry(void); | ||
104 | void menu_add_dep(struct expr *dep); | 103 | void menu_add_dep(struct expr *dep); |
105 | void menu_add_visibility(struct expr *dep); | 104 | void menu_add_visibility(struct expr *dep); |
106 | struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); | 105 | struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); |
diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index d061a4d4e203..93fe2fb841db 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c | |||
@@ -62,13 +62,8 @@ void menu_add_entry(struct symbol *sym) | |||
62 | menu_add_symbol(P_SYMBOL, sym, NULL); | 62 | menu_add_symbol(P_SYMBOL, sym, NULL); |
63 | } | 63 | } |
64 | 64 | ||
65 | void menu_end_entry(void) | ||
66 | { | ||
67 | } | ||
68 | |||
69 | struct menu *menu_add_menu(void) | 65 | struct menu *menu_add_menu(void) |
70 | { | 66 | { |
71 | menu_end_entry(); | ||
72 | last_entry_ptr = ¤t_entry->list; | 67 | last_entry_ptr = ¤t_entry->list; |
73 | return current_menu = current_entry; | 68 | return current_menu = current_entry; |
74 | } | 69 | } |
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y index c1e4e82f56b5..798d56cba4a9 100644 --- a/scripts/kconfig/zconf.y +++ b/scripts/kconfig/zconf.y | |||
@@ -175,7 +175,6 @@ config_entry_start: T_CONFIG nonconst_symbol T_EOL | |||
175 | 175 | ||
176 | config_stmt: config_entry_start config_option_list | 176 | config_stmt: config_entry_start config_option_list |
177 | { | 177 | { |
178 | menu_end_entry(); | ||
179 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); | 178 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); |
180 | }; | 179 | }; |
181 | 180 | ||
@@ -192,7 +191,6 @@ menuconfig_stmt: menuconfig_entry_start config_option_list | |||
192 | current_entry->prompt->type = P_MENU; | 191 | current_entry->prompt->type = P_MENU; |
193 | else | 192 | else |
194 | zconfprint("warning: menuconfig statement without prompt"); | 193 | zconfprint("warning: menuconfig statement without prompt"); |
195 | menu_end_entry(); | ||
196 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); | 194 | printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno()); |
197 | }; | 195 | }; |
198 | 196 | ||
@@ -421,9 +419,7 @@ comment: T_COMMENT prompt T_EOL | |||
421 | }; | 419 | }; |
422 | 420 | ||
423 | comment_stmt: comment depends_list | 421 | comment_stmt: comment depends_list |
424 | { | 422 | ; |
425 | menu_end_entry(); | ||
426 | }; | ||
427 | 423 | ||
428 | /* help option */ | 424 | /* help option */ |
429 | 425 | ||