Skip to content

Commit df60f4b

Browse files
ulfalizermasahir0y
authored andcommitted
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>
1 parent 0735f7e commit df60f4b

3 files changed

Lines changed: 1 addition & 11 deletions

File tree

‎scripts/kconfig/lkc.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ void menu_warn(struct menu *menu, const char *fmt, ...);
100100
struct menu *menu_add_menu(void);
101101
void menu_end_menu(void);
102102
void menu_add_entry(struct symbol *sym);
103-
void menu_end_entry(void);
104103
void menu_add_dep(struct expr *dep);
105104
void menu_add_visibility(struct expr *dep);
106105
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);

‎scripts/kconfig/menu.c‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,8 @@ void menu_add_entry(struct symbol *sym)
6262
menu_add_symbol(P_SYMBOL, sym, NULL);
6363
}
6464

65-
void menu_end_entry(void)
66-
{
67-
}
68-
6965
struct menu *menu_add_menu(void)
7066
{
71-
menu_end_entry();
7267
last_entry_ptr = &current_entry->list;
7368
return current_menu = current_entry;
7469
}

‎scripts/kconfig/zconf.y‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ config_entry_start: T_CONFIG nonconst_symbol T_EOL
175175

176176
config_stmt: config_entry_start config_option_list
177177
{
178-
menu_end_entry();
179178
printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
180179
};
181180

@@ -192,7 +191,6 @@ menuconfig_stmt: menuconfig_entry_start config_option_list
192191
current_entry->prompt->type = P_MENU;
193192
else
194193
zconfprint("warning: menuconfig statement without prompt");
195-
menu_end_entry();
196194
printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
197195
};
198196

@@ -421,9 +419,7 @@ comment: T_COMMENT prompt T_EOL
421419
};
422420

423421
comment_stmt: comment depends_list
424-
{
425-
menu_end_entry();
426-
};
422+
;
427423

428424
/* help option */
429425

0 commit comments

Comments
 (0)