* [PATCH v2] kconfig: Remove menu_end_entry()
@ 2017-10-08 22:14 Ulf Magnusson
2017-10-09 6:45 ` kbuild test robot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ulf Magnusson @ 2017-10-08 22:14 UTC (permalink / raw)
To: yann.morin.1998, linux-kbuild
Cc: sam, zippel, nicolas.pitre, michal.lkml, dirk, yamada.masahiro,
lacombar, JBeulich, linux-kernel, Ulf Magnusson
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>
---
Changes in v2:
- Don't include the regenerated parser. It wouldn't be safe to pull it
directly from the patch if other changes go in before, and it might cause
unnecessary merge conflicts. Regenerate it manually instead:
$ make REGENERATE_PARSERS=1 conf
scripts/kconfig/lkc.h | 1 -
| 5 -----
scripts/kconfig/zconf.y | 6 +-----
3 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
index cdcbe43..16cb62b 100644
--- a/scripts/kconfig/lkc.h
+++ b/scripts/kconfig/lkc.h
@@ -100,7 +100,6 @@ void menu_warn(struct menu *menu, const char *fmt, ...);
struct menu *menu_add_menu(void);
void menu_end_menu(void);
void menu_add_entry(struct symbol *sym);
-void menu_end_entry(void);
void menu_add_dep(struct expr *dep);
void menu_add_visibility(struct expr *dep);
struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep);
--git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c
index e935793..503f3ae 100644
--- a/scripts/kconfig/menu.c
+++ b/scripts/kconfig/menu.c
@@ -62,13 +62,8 @@ void menu_add_entry(struct symbol *sym)
menu_add_symbol(P_SYMBOL, sym, NULL);
}
-void menu_end_entry(void)
-{
-}
-
struct menu *menu_add_menu(void)
{
- menu_end_entry();
last_entry_ptr = ¤t_entry->list;
return current_menu = current_entry;
}
diff --git a/scripts/kconfig/zconf.y b/scripts/kconfig/zconf.y
index c8f396c..3845aa9 100644
--- a/scripts/kconfig/zconf.y
+++ b/scripts/kconfig/zconf.y
@@ -155,7 +155,6 @@ config_entry_start: T_CONFIG T_WORD T_EOL
config_stmt: config_entry_start config_option_list
{
- menu_end_entry();
printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
};
@@ -173,7 +172,6 @@ menuconfig_stmt: menuconfig_entry_start config_option_list
current_entry->prompt->type = P_MENU;
else
zconfprint("warning: menuconfig statement without prompt");
- menu_end_entry();
printd(DEBUG_PARSE, "%s:%d:endconfig\n", zconf_curname(), zconf_lineno());
};
@@ -406,9 +404,7 @@ comment: T_COMMENT prompt T_EOL
};
comment_stmt: comment depends_list
-{
- menu_end_entry();
-};
+;
/* help option */
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kconfig: Remove menu_end_entry()
2017-10-08 22:14 [PATCH v2] kconfig: Remove menu_end_entry() Ulf Magnusson
@ 2017-10-09 6:45 ` kbuild test robot
2017-10-09 8:20 ` kbuild test robot
2018-01-11 15:33 ` Masahiro Yamada
2 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2017-10-09 6:45 UTC (permalink / raw)
To: Ulf Magnusson
Cc: kbuild-all, yann.morin.1998, linux-kbuild, sam, zippel,
nicolas.pitre, michal.lkml, dirk, yamada.masahiro, lacombar,
JBeulich, linux-kernel
Hi Ulf,
[auto build test ERROR on linus/master]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ulf-Magnusson/kconfig-Remove-menu_end_entry/20171009-140245
config: x86_64-randconfig-x018-201741
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
make ARCH=x86_64 randconfig
make ARCH=x86_64
All error/warnings (new ones prefixed by >>):
scripts/kconfig/zconf.tab.o: In function `zconfparse':
>> zconf.tab.c:(.text+0x9b39): undefined reference to `menu_end_entry'
zconf.tab.c:(.text+0xa5a5): undefined reference to `menu_end_entry'
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/kconfig/conf] Error 1
make[2]: Target 'oldconfig' not remade because of errors.
make[1]: *** [oldconfig] Error 2
make: *** [sub-make] Error 2
--
scripts/kconfig/zconf.tab.c: In function 'zconfparse':
>> scripts/kconfig/zconf.tab.c:1555:2: warning: implicit declaration of function 'menu_end_entry' [-Wimplicit-function-declaration]
menu_end_entry();
^~~~~~~~~~~~~~
scripts/kconfig/zconf.tab.o: In function `zconfparse':
>> zconf.tab.c:(.text+0x9b39): undefined reference to `menu_end_entry'
zconf.tab.c:(.text+0xa5a5): undefined reference to `menu_end_entry'
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/kconfig/conf] Error 1
make[2]: Target 'oldnoconfig' not remade because of errors.
make[1]: *** [oldnoconfig] Error 2
make: *** [sub-make] Error 2
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kconfig: Remove menu_end_entry()
2017-10-08 22:14 [PATCH v2] kconfig: Remove menu_end_entry() Ulf Magnusson
2017-10-09 6:45 ` kbuild test robot
@ 2017-10-09 8:20 ` kbuild test robot
2018-01-11 15:33 ` Masahiro Yamada
2 siblings, 0 replies; 4+ messages in thread
From: kbuild test robot @ 2017-10-09 8:20 UTC (permalink / raw)
To: Ulf Magnusson
Cc: kbuild-all, yann.morin.1998, linux-kbuild, sam, zippel,
nicolas.pitre, michal.lkml, dirk, yamada.masahiro, lacombar,
JBeulich, linux-kernel
Hi Ulf,
[auto build test ERROR on linus/master]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Ulf-Magnusson/kconfig-Remove-menu_end_entry/20171009-140245
config: x86_64-rhel
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All errors (new ones prefixed by >>):
scripts/kconfig/zconf.tab.o: In function `zconfparse':
>> zconf.tab.c:(.text+0x9b39): undefined reference to `menu_end_entry'
zconf.tab.c:(.text+0xa5a5): undefined reference to `menu_end_entry'
>> collect2: error: ld returned 1 exit status
make[2]: *** [scripts/kconfig/conf] Error 1
make[2]: Target 'oldconfig' not remade because of errors.
make[1]: *** [oldconfig] Error 2
make: *** [sub-make] Error 2
--
scripts/kconfig/zconf.tab.c: In function 'zconfparse':
scripts/kconfig/zconf.tab.c:1555:2: warning: implicit declaration of function 'menu_end_entry' [-Wimplicit-function-declaration]
menu_end_entry();
^~~~~~~~~~~~~~
scripts/kconfig/zconf.tab.o: In function `zconfparse':
>> zconf.tab.c:(.text+0x9b39): undefined reference to `menu_end_entry'
zconf.tab.c:(.text+0xa5a5): undefined reference to `menu_end_entry'
>> collect2: error: ld returned 1 exit status
make[2]: *** [scripts/kconfig/conf] Error 1
make[2]: Target 'oldnoconfig' not remade because of errors.
make[1]: *** [oldnoconfig] Error 2
make: *** [sub-make] Error 2
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] kconfig: Remove menu_end_entry()
2017-10-08 22:14 [PATCH v2] kconfig: Remove menu_end_entry() Ulf Magnusson
2017-10-09 6:45 ` kbuild test robot
2017-10-09 8:20 ` kbuild test robot
@ 2018-01-11 15:33 ` Masahiro Yamada
2 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2018-01-11 15:33 UTC (permalink / raw)
To: Ulf Magnusson
Cc: Yann E. MORIN, Linux Kbuild mailing list, Sam Ravnborg, zippel,
Nicolas Pitre, Michal Marek, dirk, Arnaud Lacombe, Jan Beulich,
Linux Kernel Mailing List
2017-10-09 7:14 GMT+09:00 Ulf Magnusson <ulfalizer@gmail.com>:
> 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>
> ---
> Changes in v2:
> - Don't include the regenerated parser. It wouldn't be safe to pull it
> directly from the patch if other changes go in before, and it might cause
> unnecessary merge conflicts. Regenerate it manually instead:
>
> $ make REGENERATE_PARSERS=1 conf
>
Applied to linux-kbuild/kconfig. Thanks!
With this, I think I picked up all the patches you posted in the last October.
(let me know if I am missing something.)
Thanks a lot for all of your contribution!
(and also Kconfiglib, I used in U-Boot)
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-01-11 15:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08 22:14 [PATCH v2] kconfig: Remove menu_end_entry() Ulf Magnusson
2017-10-09 6:45 ` kbuild test robot
2017-10-09 8:20 ` kbuild test robot
2018-01-11 15:33 ` Masahiro Yamada
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).