[PATCH 10/11] nios2: kconfig: Remove blank help text

2018-01-31 Thread Ulf Magnusson
Blank help texts are probably either a typo, a Kconfig misunderstanding, or some kind of half-committing to adding a help text (in which case a TODO comment would be clearer, if the help text really can't be added right away). Best to remove them, IMO. Signed-off-by: Ulf Magnusson ---

[PATCH 05/11] Staging: rtl8192e: kconfig: Remove blank help text

2018-01-31 Thread Ulf Magnusson
Blank help texts are probably either a typo, a Kconfig misunderstanding, or some kind of half-committing to adding a help text (in which case a TODO comment would be clearer, if the help text really can't be added right away). Best to remove them, IMO. Signed-off-by: Ulf Magnusson --- dr

[PATCH 07/11] MIPS: BCM63XX: kconfig: Remove blank help text

2018-01-31 Thread Ulf Magnusson
Blank help texts are probably either a typo, a Kconfig misunderstanding, or some kind of half-committing to adding a help text (in which case a TODO comment would be clearer, if the help text really can't be added right away). Best to remove them, IMO. Signed-off-by: Ulf Magnusson ---

[PATCH 02/11] video: fbdev: kconfig: Remove blank help text

2018-01-31 Thread Ulf Magnusson
Blank help texts are probably either a typo, a Kconfig misunderstanding, or some kind of half-committing to adding a help text (in which case a TODO comment would be clearer, if the help text really can't be added right away). Best to remove them, IMO. Signed-off-by: Ulf Magnusson --- dr

[PATCH 00/11] Remove blank help texts from Kconfig files and add warning

2018-01-31 Thread Ulf Magnusson
This patchset first removes all blank help texts from Kconfig files for all arches, and then makes Kconfig print a warning for blank help texts. All patches can be applied independently, but to avoid warning spam, the blank help texts ought to be removed before the warning is added. Ulf

Re: [PATCH 05/10] Staging: rtl8192e: kconfig: Remove empty help text

2018-01-31 Thread Ulf Magnusson
On Wed, Jan 31, 2018 at 9:06 AM, Dan Carpenter wrote: > On Tue, Jan 30, 2018 at 08:05:27PM +0100, Ulf Magnusson wrote: >> In preparation for adding a warning ("kconfig: Warn if help text is >> blank"): https://lkml.org/lkml/2018/1/30/516 >> > > Please don&

Re: [PATCH] kconfig: Warn if help text is blank

2018-01-30 Thread Ulf Magnusson
On Tue, Jan 30, 2018 at 7:34 PM, Paul Bolle wrote: > On Tue, 2018-01-30 at 19:18 +0100, Ulf Magnusson wrote: >> Print a warning if a 'help' token is given but the help text is blank. >> Personal pet peeve. >> >> Example warnings: >> >>

[PATCH v2 06/10] lib/Kconfig.debug: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- lib/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index b66c264d4194..6088408ef

[PATCH v2 08/10] MIPS: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- arch/mips/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index ab98569994f0..57cd591e7

[PATCH v2 09/10] arm: vt8500: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- arch/arm/mach-vt8500/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kco

[PATCH v2 10/10] nios2: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- arch/nios2/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig index 60fae03dac79..3d4ec88f1

[PATCH v2 07/10] MIPS: BCM63XX: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- arch/mips/bcm63xx/boards/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/mips/bcm63xx/boards/Kconfig b/arch/mips/bcm6

[PATCH v2 05/10] Staging: rtl8192e: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- drivers/staging/rtl8192e/rtl8192e/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/Kconfig

[PATCH v2 03/10] mmc: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- drivers/mmc/host/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 67

[PATCH v2 04/10] Staging: rtl8192u: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- drivers/staging/rtl8192u/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192u/Kconfig b/drivers/stagin

[PATCH v2 01/10] net/sched: kconfig: Remove empty help texts

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- net/sched/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/sched/Kconfig b/net/sched/Kconfig index c03d86a7775e..f24a6ae68

[PATCH v2 02/10] video: fbdev: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- drivers/video/fbdev/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kco

[PATCH v2 00/10] Remove empty help texts from Kconfig files

2018-01-30 Thread Ulf Magnusson
cover letter to linux-kbuild. Ulf Magnusson (10): net/sched: kconfig: Remove empty help texts video: fbdev: kconfig: Remove empty help text mmc: kconfig: Remove empty help text Staging: rtl8192u: kconfig: Remove empty help text Staging: rtl8192e: kconfig: Remove empty help text

[PATCH 09/10] arm: vt8500: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- arch/arm/mach-vt8500/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kco

[PATCH 06/10] lib/Kconfig.debug: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- lib/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index b66c264d4194..6088408ef

[PATCH 08/10] MIPS: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- arch/mips/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index ab98569994f0..57cd591e7

[PATCH 10/10] nios2: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- arch/nios2/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/nios2/Kconfig b/arch/nios2/Kconfig index 60fae03dac79..3d4ec88f1

[PATCH 07/10] MIPS: BCM63XX: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- arch/mips/bcm63xx/boards/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/mips/bcm63xx/boards/Kconfig b/arch/mips/bcm6

[PATCH 05/10] Staging: rtl8192e: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- drivers/staging/rtl8192e/rtl8192e/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192e/rtl8192e/Kconfig

[PATCH 03/10] mmc: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- drivers/mmc/host/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 67

[PATCH 04/10] Staging: rtl8192u: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- drivers/staging/rtl8192u/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/rtl8192u/Kconfig b/drivers/stagin

[PATCH 02/10] video: fbdev: kconfig: Remove empty help text

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- drivers/video/fbdev/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kco

[PATCH 01/10] net/sched: kconfig: Remove empty help texts

2018-01-30 Thread Ulf Magnusson
In preparation for adding a warning ("kconfig: Warn if help text is blank"): https://lkml.org/lkml/2018/1/30/516 Signed-off-by: Ulf Magnusson --- net/sched/Kconfig | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/sched/Kconfig b/net/sched/Kconfig index c03d86a7775e..f24a6ae68

[PATCH] kconfig: Warn if help text is blank

2018-01-30 Thread Ulf Magnusson
NT_FRAME_POINTERS' defined with blank help text A separate patchset will be sent to fix all current instances of blank help texts for all arches. I added the same warning to Kconfiglib. Signed-off-by: Ulf Magnusson --- scripts/kconfig/zconf.y | 6 ++ 1 file changed, 6 insert

Re: [PATCH] kconfig: Clarify choice dependency propagation

2018-01-18 Thread Ulf Magnusson
On Thu, Jan 18, 2018 at 5:47 PM, Masahiro Yamada wrote: > 2018-01-14 23:12 GMT+09:00 Ulf Magnusson : >> It's easy to miss that choices are special-cased to pass on their mode >> as the parent dependency. >> >> No functional changes. Only comments added. &g

Re: [PATCH] kconfig: announce removal of oldnoconfig if used

2018-01-18 Thread Ulf Magnusson
e. > oldnoconfig: olddefconfig > + @echo " WARNING: \"oldnoconfig\" target will be removed after Linux > 4.19" > + @echo "Please use \"olddefconfig\" instead." > > savedefconfig: $(obj)/conf > $< $(sil

[PATCH] kconfig: Clarify menu and 'if' dependency propagation

2018-01-16 Thread Ulf Magnusson
It is not obvious that the last two cases refer to menus and ifs, respectively, in the conditional that sets 'parentdep'. Automatic submenu creation is done later, so the parent can't be a symbol here. No functional changes. Only comments added. Signed-off-by: Ulf Magnusso

Re: [PATCH 0/2] kconfig: 'if' and automatic submenu creation documentation

2018-01-15 Thread Ulf Magnusson
On Sun, Jan 14, 2018 at 10:00 PM, Sam Ravnborg wrote: > Hi Ulf. > > On Sun, Jan 14, 2018 at 12:33:43PM +0100, Ulf Magnusson wrote: >> These together should make the automatic submenu logic a lot clearer. >> >> Ulf Magnusson (2): >> kconfig: Document 'if&#

[PATCH v2 1/2] kconfig: Document 'if' flattening logic

2018-01-14 Thread Ulf Magnusson
functional changes. Only comments added. Signed-off-by: Ulf Magnusson --- Changelog v2: I forgot to mention that this code also undoes automatic submenus created below promptless symbols. scripts/kconfig/menu.c | 29 + 1 file changed, 29 insertions(+) diff --git a/

[PATCH] kconfig: Clarify choice dependency propagation

2018-01-14 Thread Ulf Magnusson
It's easy to miss that choices are special-cased to pass on their mode as the parent dependency. No functional changes. Only comments added. Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/scripts/kconfig/menu.c b/sc

[PATCH 2/2] kconfig: Improve auto. menu documentation accuracy

2018-01-14 Thread Ulf Magnusson
An 'if', 'menu', or 'choice' that depends on a preceding symbol will also generate a submenu. No functional changes. Only comments updated. Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-)

[PATCH 1/2] kconfig: Document 'if' flattening logic

2018-01-14 Thread Ulf Magnusson
functional changes. Only comments added. Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 24 1 file changed, 24 insertions(+) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 372eb5d9fef3..1f7bcceacde3 100644 --- a/scripts/kconfig/menu.c +++ b/

[PATCH 1/2] kconfig: Document 'if' flattening logic

2018-01-14 Thread Ulf Magnusson
functional changes. Only comments added. Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 24 1 file changed, 24 insertions(+) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 372eb5d9fef3..1f7bcceacde3 100644 --- a/scripts/kconfig/menu.c +++ b/

[PATCH 0/2] kconfig: 'if' and automatic submenu creation documentation

2018-01-14 Thread Ulf Magnusson
These together should make the automatic submenu logic a lot clearer. Ulf Magnusson (2): kconfig: Document 'if' flattening logic kconfig: Improve auto. menu documentation accuracy scripts/kconfig/menu.c | 33 + 1 file changed, 29 insertions(+), 4

[PATCH] kconfig: Document SYMBOL_OPTIONAL logic

2018-01-14 Thread Ulf Magnusson
Not obvious, especially if you don't already know how choices are implemented. No functional changes. Only comments added. Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 9 + 1 file changed, 9 insertions(+) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c

Re: [PATCH] kconfig: Sync zconf.y with zconf.tab.c_shipped

2018-01-13 Thread Ulf Magnusson
On Fri, Jan 12, 2018 at 8:38 PM, Sam Ravnborg wrote: > Hi Ulf, Masahiro > >> > >> > BTW, I do not know the historical reason >> > why zconf instead of kconf in the first place... >> >> I have no idea either. kconfig.{l,y} and kconfig_*() would be a lot >> less confusing. > > zconf was the name ori

Re: [PATCH 1/6] kconfig: do not call check_conf() for olddefconfig

2018-01-12 Thread Ulf Magnusson
On Fri, Jan 12, 2018 at 1:26 PM, Ulf Magnusson wrote: > On Wed, Jan 10, 2018 at 7:56 AM, Masahiro Yamada > wrote: >> check_conf() traverses the menu tree, but it is completely no-op for >> olddefconfig because the following if-else block does nothing. >> >> i

Re: [PATCH 6/6] kconfig: hide irrelevant menu for oldconfig

2018-01-12 Thread Ulf Magnusson
case oldaskconfig: > rootEntry = &rootmenu; > conf(&rootmenu); > - input_mode = silentoldconfig; > + input_mode = oldconfig; > /* fall through */ > case oldconfig: > case listnewconfig: > -- > 2.7.4 > Looks good to me. Maybe a comment along the following lines would be nice for check_conf() as well: /* * Recursively process modifiable symbols (and choices) in 'menu' that don't * have a user value */ check_conf() could be renamed to something like process_new_modifiable_syms() as well. The check_conf() call in conf() could have this above it as well: /* * Except in oldaskconfig mode, we're only interested in new modifiable symbols */ Acked-by: Ulf Magnusson Cheers, Ulf

Re: [PATCH 5/6] kconfig: remove redundant input_mode test for check_conf() loop

2018-01-12 Thread Ulf Magnusson
,7 +669,7 @@ int main(int ac, char **av) > do { > conf_cnt = 0; > check_conf(&rootmenu); > - } while (conf_cnt && input_mode != listnewconfig); > + } while (conf_cnt); >

Re: [PATCH 4/6] kconfig: remove unneeded input_mode test in conf()

2018-01-12 Thread Ulf Magnusson
rootEntry != menu) { > check_conf(menu); > return; > -- > 2.7.4 > LGTM Acked-by: Ulf Magnusson Cheers, Ulf

Re: [PATCH 3/6] kconfig: do not call conf_set_all_new_symbols() for (all)defconfig

2018-01-12 Thread Ulf Magnusson
On Wed, Jan 10, 2018 at 7:56 AM, Masahiro Yamada wrote: > (all)defconfig does not need to call conf_set_all_new_symbols() because > conf_write() calculates all symbols based on their default unless they > have been user-defined. > > conf_set_all_new_symbols(def_default) is no-op except for "choice

Re: [PATCH 2/6] kconfig: call sym_calc_value() for all symbols before writing to .config

2018-01-12 Thread Ulf Magnusson
sym->flags &= ~SYMBOL_WRITE; > -- > 2.7.4 > Not tested, but looks fine. As a note if anyone else takes a look, choices get propagated to the property conditions of the contained symbols, which indirectly causes the choice to be calculated when the visibility of a contained symbol is calculated. Acked-by: Ulf Magnusson Cheers, Ulf

Re: [PATCH 1/6] kconfig: do not call check_conf() for olddefconfig

2018-01-12 Thread Ulf Magnusson
t; -(input_mode != listnewconfig && > - input_mode != olddefconfig)); > + } while (conf_cnt && input_mode != listnewconfig); > + break; > + case olddefconfig: > + default: > break; > } > > -- > 2.7.4 > Acked-by: Ulf Magnusson Cheers, Ulf

Re: [PATCH] kconfig: Sync zconf.y with zconf.tab.c_shipped

2018-01-12 Thread Ulf Magnusson
On Tue, Dec 12, 2017 at 3:58 PM, Masahiro Yamada wrote: > 2017-10-05 12:06 GMT+09:00 Ulf Magnusson : >> Looks like a change to a comment in zconf.y was never committed, because >> the updated version only appears it zconf.tab.c_shipped. Update the >> comment in zconf.y to ma

Re: [PATCH 2/2] kbuild: remove unnecessary LEX_PREFIX and YACC_PREFIX

2018-01-12 Thread Ulf Magnusson
_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy) > - > quiet_cmd_bison = YACC$@ > - cmd_bison = $(YACC) -o$@ -t -l -p $(YACC_PREFIX) $< > + cmd_bison = $(YACC) -o$@ -t -l $< > > ifdef REGENERATE_PARSERS > .PRECIOUS: $(src)/%.tab.c_shipped > -- > 2.7.4 > Acked-by: Ulf Magnusson Cheers, Ulf

Re: [PATCH 1/2] kconfig: use default 'yy' prefix for lexer and parser

2018-01-12 Thread Ulf Magnusson
zconfnerrs++; > + yynerrs++; > return false; > } > return true; > @@ -601,7 +601,7 @@ static void zconf_error(const char *err, ...) > { > va_list ap; > > - zconfnerrs++; > + yynerrs++; > fprintf(stderr, "%s:%d: ", zconf_curname(), zconf_lineno()); > va_start(ap, err); > vfprintf(stderr, err, ap); > @@ -609,7 +609,7 @@ static void zconf_error(const char *err, ...) > fprintf(stderr, "\n"); > } > > -static void zconferror(const char *err) > +static void yyerror(const char *err) > { > fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, > err); > } > -- > 2.7.4 > Looks good to me. Less cryptic. Acked-by: Ulf Magnusson Cheers, Ulf

Re: [PATCH 5/6] kconfig: Don't leak help strings during parsing

2018-01-12 Thread Ulf Magnusson
On Wed, Jan 10, 2018 at 5:12 PM, Masahiro Yamada wrote: > 2017-10-09 2:11 GMT+09:00 Ulf Magnusson : >> This is just for completeness to get rid of the last memory leak >> currently generated during parsing for ARCH=x86. The symbol >> DVB_NETUP_UNIDVB in drivers/media/pci

[PATCH] kconfig: Warn if there is more than one help text

2018-01-11 Thread Ulf Magnusson
g: 'DVB_NETUP_UNIDVB' defined with more than one help text -- only the last one will be used Also free() any extra help strings. Signed-off-by: Ulf Magnusson --- scripts/kconfig/zconf.y | 5 + 1 file changed, 5 insertions(+) diff --git a/scripts/kconfig/zconf.y b/scripts/kcon

Re: [PATCH] kconfig: Remove menu_end_entry()

2017-12-13 Thread Ulf Magnusson
On Wed, Dec 13, 2017 at 5:32 PM, Ulf Magnusson wrote: > On Sat, Dec 9, 2017 at 5:27 PM, Masahiro Yamada > wrote: >> 2017-10-05 11:36 GMT+09:00 Ulf Magnusson : >>> menu_end_entry() is empty and completely unused as far as I can tell: >>> >>>

Re: [PATCH] kconfig: Remove menu_end_entry()

2017-12-13 Thread Ulf Magnusson
On Sat, Dec 9, 2017 at 5:27 PM, Masahiro Yamada wrote: > 2017-10-05 11:36 GMT+09:00 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 e

[ANNOUNCE] Kconfiglib 2: An improved, more general redesign

2017-11-09 Thread Ulf Magnusson
Hello, A new, much-improved version 2 of Kconfiglib (https://github.com/ulfalizer/Kconfiglib) is out. I got tired of some old interface and design mistakes while working on adding implicit menu support, and decided to redo things the right way. For a summary of changes, see kconfiglib-2-changes.

Re: [PATCH 6/6] kconfig: Regenerate parser

2017-10-08 Thread Ulf Magnusson
On Sun, Oct 8, 2017 at 7:11 PM, Ulf Magnusson wrote: > After the parsing memory leak fixes. > > Signed-off-by: Ulf Magnusson > --- > scripts/kconfig/zconf.tab.c_shipped | 562 > +++- > 1 file changed, 294 insertions(+), 268 deletions(-) >

[PATCH v2] kconfig: Remove menu_end_entry()

2017-10-08 Thread Ulf Magnusson
, 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 --- Changes in v2: - Don

[PATCH] kconfig: Document important expression functions

2017-10-08 Thread Ulf Magnusson
Signed-off-by: Ulf Magnusson --- scripts/kconfig/expr.c | 106 + 1 file changed, 106 insertions(+) diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index cbf4996..5965ecd 100644 --- a/scripts/kconfig/expr.c +++ b/scripts/kconfig/expr.c

[PATCH] kconfig: Document automatic submenu creation code

2017-10-08 Thread Ulf Magnusson
It's tricky to figure out what it does (and how) without staring at the code for a long time. Document it to make it more transparent. No functional changes. Only comments added. Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 38 ++ 1 file ch

[PATCH 2/3] kconfig: Fix expr_free() E_NOT leak

2017-10-08 Thread Ulf Magnusson
Summary after the fix: LEAK SUMMARY: definitely lost: 1,608 bytes in 67 blocks ... Signed-off-by: Ulf Magnusson --- scripts/kconfig/expr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/kconfig/expr.c b/scripts/kconfig/expr.c index cbf4996..ed2

[PATCH 3/3] kconfig: Fix choice symbol expression leak

2017-10-08 Thread Ulf Magnusson
pression node and not the choice symbol itself. Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix: LEAK SUMMARY: definitely lost: 1,608 bytes in 67 blocks ... Summary after the fix: LEAK SUMMARY: definitely lost: 0 bytes

[PATCH 1/3] kconfig: Fix automatic menu creation mem leak

2017-10-08 Thread Ulf Magnusson
x27; (ARCH=x86) before the fix: LEAK SUMMARY: definitely lost: 344,376 bytes in 14,349 blocks ... Summary after the fix: LEAK SUMMARY: definitely lost: 44,448 bytes in 1,852 blocks ... Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 1

[PATCH 0/3] kconfig: Fix expression memory leaks

2017-10-08 Thread Ulf Magnusson
H=x86 KERNELVERSION=4.14.0-rc2 valgrind --leak-check=full scripts/kconfig/mconf Kconfig Cheers, Ulf Ulf Magnusson (3): kconfig: Fix automatic menu creation mem leak kconfig: Fix expr_free() E_NOT leak kconfig: Fix choice symbol expression leak scripts/kconfig/expr.c | 2 +- scripts/kconfig/menu.

[PATCH 4/6] Kconfig: Don't leak main menus during parsing

2017-10-08 Thread Ulf Magnusson
' statement or not, and managing it becomes simple. Summary from Valgrind on 'menuconfig' (ARCH=x86) before the fix: LEAK SUMMARY: definitely lost: 344,568 bytes in 14,352 blocks ... Summary after the fix: LEAK SUMMARY: definitely l

[PATCH 2/6] kconfig: Don't leak 'source' filenames during parsing

2017-10-08 Thread Ulf Magnusson
y after the fix: LEAK SUMMARY: definitely lost: 344,616 bytes in 14,355 blocks ... Signed-off-by: Ulf Magnusson --- scripts/kconfig/symbol.c | 5 + scripts/kconfig/zconf.y | 1 + 2 files changed, 6 insertions(+) diff --git a/scripts/kconfig/symbol.c b/scripts/

[PATCH 1/6] kconfig: Don't leak symbol names during parsing

2017-10-08 Thread Ulf Magnusson
... Summary after the fix: LEAK SUMMARY: definitely lost: 387,504 bytes in 15,545 blocks ... Signed-off-by: Ulf Magnusson --- scripts/kconfig/zconf.y | 36 +++- 1 file changed, 19 insertions(+), 17 deletions(-) diff --gi

[PATCH 0/6] kconfig: Fix memory leaks during parsing

2017-10-08 Thread Ulf Magnusson
look at KERNELVERSION, so just set it to avoid a warning): $ ARCH=x86 SRCARCH=x86 KERNELVERSION=4.14.0-rc2 valgrind --leak-check=full scripts/kconfig/mconf Kconfig Cheers, Ulf Ulf Magnusson (6): kconfig: Don't leak symbol names during parsing kconfig: Don't leak 's

[PATCH 3/6] kconfig: Don't leak 'option' arguments during parsing

2017-10-08 Thread Ulf Magnusson
x27; (ARCH=x86) before the fix: LEAK SUMMARY: definitely lost: 344,616 bytes in 14,355 blocks ... Summary after the fix: LEAK SUMMARY: definitely lost: 344,568 bytes in 14,352 blocks ... Signed-off-by: Ulf Magnusson --- scripts/kconfig/zconf

[PATCH 5/6] kconfig: Don't leak help strings during parsing

2017-10-08 Thread Ulf Magnusson
(ARCH=x86) before the fix: LEAK SUMMARY: definitely lost: 344,440 bytes in 14,350 blocks ... Summary after the fix: LEAK SUMMARY: definitely lost: 344,376 bytes in 14,349 blocks ... Signed-off-by: Ulf Magnusson --- scripts/kconfig/zconf.y

[PATCH 6/6] kconfig: Regenerate parser

2017-10-08 Thread Ulf Magnusson
After the parsing memory leak fixes. Signed-off-by: Ulf Magnusson --- scripts/kconfig/zconf.tab.c_shipped | 562 +++- 1 file changed, 294 insertions(+), 268 deletions(-) diff --git a/scripts/kconfig/zconf.tab.c_shipped b/scripts/kconfig/zconf.tab.c_shipped

[PATCH 3/3] kconfig: Clean up modules handling and fix crash

2017-10-05 Thread Ulf Magnusson
efault ""'. - The Kconfiglib test suite was run to indirectly verify that alldefconfig, allyesconfig, allnoconfig, and all defconfigs in the kernel still generate the same final .config. - Valgrind was used to check for memory errors and (new) memory

[PATCH 2/3] kconfig: Clarify expression rewriting

2017-10-05 Thread Ulf Magnusson
. Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 52 ++ 1 file changed, 52 insertions(+) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 8354dfa..94f192de 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c

[PATCH 1/3] kconfig: Rename menu_check_dep() to rewrite_m()

2017-10-05 Thread Ulf Magnusson
More directly describes the only thing it does. Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index e935793..8354dfa 100644 --- a/scripts/kconfig

[PATCH 0/3] kconfig: Make 'm' safe before modules symbol is defined

2017-10-05 Thread Ulf Magnusson
), Kconfiglib, and Valgrind. Cheers, Ulf Ulf Magnusson (3): kconfig: Rename menu_check_dep() to rewrite_m() kconfig: Clarify expression rewriting kconfig: Clean up modules handling and fix crash scripts/kconfig/menu.c | 74 -- 1 file changed, 6

Re: [PATCH] kconfig: Document the 'symbol' struct

2017-10-04 Thread Ulf Magnusson
On Wed, Oct 4, 2017 at 7:48 AM, Ulf Magnusson wrote: > Visibility and choices in particular might be a bit tricky to figure > out. > > Also fix existing comment to point out that P_MENU is also used for > menus. > > Signed-off-by: Ulf Magnusson > --- >

Re: [PATCH] kconfig: Document the 'menu' struct

2017-10-04 Thread Ulf Magnusson
On Wed, Oct 4, 2017 at 5:37 AM, Ulf Magnusson wrote: > Understanding what it represents helps a lot when reading the code, and > it's not obvious, so document it. > > The ROOT_MENU flag is only set and tested by the gconf and qconf front > ends, so leave it undocumented her

Re: [PATCH] kconfig: Warn if choice default is not in choice

2017-10-04 Thread Ulf Magnusson
On Wed, Oct 4, 2017 at 2:10 AM, Ulf Magnusson wrote: > On Wed, Oct 4, 2017 at 1:25 AM, Ulf Magnusson wrote: >> This will catch mistakes like in the following real-world example, where >> a "CONFIG_" prefix snuck in, making an undefined symbol the defa

[PATCH] kconfig: Sync zconf.y with zconf.tab.c_shipped

2017-10-04 Thread Ulf Magnusson
Looks like a change to a comment in zconf.y was never committed, because the updated version only appears it zconf.tab.c_shipped. Update the comment in zconf.y to match. Signed-off-by: Ulf Magnusson --- scripts/kconfig/zconf.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH] kconfig: Remove menu_end_entry()

2017-10-04 Thread Ulf Magnusson
, 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 --- scripts/kconfig/lkc.h

[PATCH] kconfig: Document the 'symbol' struct

2017-10-03 Thread Ulf Magnusson
Visibility and choices in particular might be a bit tricky to figure out. Also fix existing comment to point out that P_MENU is also used for menus. Signed-off-by: Ulf Magnusson --- scripts/kconfig/expr.h | 45 - 1 file changed, 44 insertions(+), 1

[PATCH] kconfig: Document the 'menu' struct

2017-10-03 Thread Ulf Magnusson
Understanding what it represents helps a lot when reading the code, and it's not obvious, so document it. The ROOT_MENU flag is only set and tested by the gconf and qconf front ends, so leave it undocumented here. The obvious guess for what it means is correct. Signed-off-by: Ulf Magn

Re: [PATCH] kconfig: Warn if choice default is not in choice

2017-10-03 Thread Ulf Magnusson
On Wed, Oct 4, 2017 at 1:25 AM, Ulf Magnusson wrote: > This will catch mistakes like in the following real-world example, where > a "CONFIG_" prefix snuck in, making an undefined symbol the default: > > choice > prompt &qu

[PATCH] kbuild: Fix optimization level choice default

2017-10-03 Thread Ulf Magnusson
he visible symbol as the default instead, which is CC_OPTIMIZE_FOR_PERFORMANCE, as intended. A patch that makes Kconfig print a warning in this case has been submitted separately: http://www.spinics.net/lists/linux-kbuild/msg15566.html Signed-off-by: Ulf Magnusson --- init/Kconfig | 2 +- 1 file

[PATCH] kconfig: Warn if choice default is not in choice

2017-10-03 Thread Ulf Magnusson
ered while playing around with Kconfiglib (https://github.com/ulfalizer/Kconfiglib). Signed-off-by: Ulf Magnusson --- scripts/kconfig/menu.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index e935793..ce88de8 100644 --- a/scripts/kconfi

Re: [PATCH v4 0/2] kconfig: warn of unhandled characters in Kconfig commands

2015-07-20 Thread Ulf Magnusson
| 1 + > scripts/kconfig/zconf.hash.c_shipped | 58 --- > scripts/kconfig/zconf.l | 20 ++- > scripts/kconfig/zconf.lex.c_shipped | 325 > +-- > 4 files changed, 204 insertions(+), 200 deletions(-) > > -- > 1.9.1 > For

Re: [PATCH] DocBook: Avoid stdout junk with no man pages to compress

2015-07-13 Thread Ulf Magnusson
On Tue, Jul 14, 2015 at 6:27 AM, Ulf Magnusson wrote: > On Mon, Jul 13, 2015 at 2:46 AM, Ulf Magnusson > wrote: >> On Sun, Jul 12, 2015 at 04:36:53PM -0700, Jim Davis wrote: >>> On Sun, Jul 12, 2015 at 2:59 PM, Ulf Magnusson >>> wrote: >>> > gzip w

Re: [PATCH] DocBook: Avoid stdout junk with no man pages to compress

2015-07-13 Thread Ulf Magnusson
On Mon, Jul 13, 2015 at 2:46 AM, Ulf Magnusson wrote: > On Sun, Jul 12, 2015 at 04:36:53PM -0700, Jim Davis wrote: >> On Sun, Jul 12, 2015 at 2:59 PM, Ulf Magnusson >> wrote: >> > gzip would run as 'gzip -f' when no uncompressed man pages were found, >> &

Re: KDBUS breaks 'make installmandocs'

2015-07-13 Thread Ulf Magnusson
On Mon, Jul 13, 2015 at 05:39:25PM -0700, Greg KH wrote: > On Sun, Jul 12, 2015 at 08:08:46PM +0200, Ulf Magnusson wrote: > > Hello, > > > > Tested with next-20150709. > > > > Documentation/kdbus/Makefile lacks an 'installmandocs' target, causing >

Re: [PATCH] DocBook: Avoid stdout junk with no man pages to compress

2015-07-12 Thread Ulf Magnusson
On Sun, Jul 12, 2015 at 04:36:53PM -0700, Jim Davis wrote: > On Sun, Jul 12, 2015 at 2:59 PM, Ulf Magnusson > wrote: > > gzip would run as 'gzip -f' when no uncompressed man pages were found, > > making it compress the (empty) stdin to stdout. > > >

[PATCH] DocBook: Avoid stdout junk with no man pages to compress

2015-07-12 Thread Ulf Magnusson
`find $(obj)/man -name '*.9'`; \ if [ -n "$$man_pages" ]; then \ echo "$$man_pages" | xargs gzip -f; \ fi Signed-off-by: Ulf Magnusson --- Documentation/DocBook/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation

KDBUS breaks 'make installmandocs'

2015-07-12 Thread Ulf Magnusson
Hello, Tested with next-20150709. Documentation/kdbus/Makefile lacks an 'installmandocs' target, causing problems for %docs: scripts_basic FORCE $(Q)$(MAKE) $(build)=scripts build_docproc $(Q)$(MAKE) $(build)=Documentation/DocBook $@ $(Q)$(MAKE) $(build)=Documentation/kdb

Re: [PATCH v3 1/2] kconfig: warn of unhandled characters in Kconfig commands

2015-07-11 Thread Ulf Magnusson
One more nitpick (should be the last one): On Fri, Jul 10, 2015 at 10:25:32AM +0200, Andreas Ruprecht wrote: > In Kconfig, definitions of options take the following form: > " ...". COMMANDs and PARAMs are treated > slightly different by the underlying parser. > > While commit 2e0d737fc76f ("kco

Re: [PATCH v3 0/2] kconfig: warn of unhandled characters in Kconfig commands

2015-07-11 Thread Ulf Magnusson
On Fri, Jul 10, 2015 at 10:25:31AM +0200, Andreas Ruprecht wrote: > This patchset changes the lexer file to emit a warning if any unhandled > characters are found in the input. So far, Kconfig options like > > +config FOO > bool > [...] > > (note the wrong '+'!) were parsed without a war

Re: [PATCH v2 1/2] kconfig: warn of unhandled characters in Kconfig commands

2015-07-09 Thread Ulf Magnusson
One more nitpick: On Tue, Jul 07, 2015 at 12:31:16PM +0200, Andreas Ruprecht wrote: > In Kconfig, definitions of options take the following form: > " ...". COMMANDs and PARAMs are treated > slightly different by the underlying parser. > > While commit 2e0d737fc76f ("kconfig: don't silently igno

Re: [PATCH 1/2] kconfig: also warn of unhandled characters in statements

2015-07-08 Thread Ulf Magnusson
On Wed, Jul 8, 2015 at 12:17 PM, Andreas Ruprecht wrote: > Hi, > > On 07/07/2015 16:45, Ulf Magnusson wrote: >> >> Did you use the (undocumented, obviously :) REGENERATE_PARSERS option, >> like 'make menuconfig REGENERATE_PARSERS=1'? It's from >>

Re: [PATCH v2 1/2] kconfig: warn of unhandled characters in Kconfig commands

2015-07-08 Thread Ulf Magnusson
On Tue, Jul 7, 2015 at 12:31 PM, Andreas Ruprecht wrote: > In Kconfig, definitions of options take the following form: > " ...". COMMANDs and PARAMs are treated > slightly different by the underlying parser. > > While commit 2e0d737fc76f ("kconfig: don't silently ignore unhandled > characters")

Re: [PATCH 1/2] kconfig: also warn of unhandled characters in statements

2015-07-05 Thread Ulf Magnusson
A more exact commit title would be something like "warn for unhandled characters before the initial token on a line". On Fri, Jul 3, 2015 at 2:46 PM, Andreas Ruprecht wrote: > While commit 2e0d737fc76f ("kconfig: don't silently ignore unhandled > characters") introduced a warning for unsupported

Re: [PATCH 1/2] kconfig: also warn of unhandled characters in statements

2015-07-05 Thread Ulf Magnusson
On Sat, Jul 4, 2015 at 11:33 AM, Paul Bolle wrote: > On vr, 2015-07-03 at 14:46 +0200, Andreas Ruprecht wrote: >> While commit 2e0d737fc76f ("kconfig: don't silently ignore unhandled >> characters") introduced a warning for unsupported characters inside >> parameters, > > What are "parameters"? Th

Re: Kconfig: '+config' valid syntax?

2015-07-03 Thread Ulf Magnusson
On Fri, Jul 3, 2015 at 2:39 PM, Ulf Magnusson wrote: > On Fri, Jul 3, 2015 at 1:40 PM, Ulf Magnusson > wrote: >> On Fri, Jul 3, 2015 at 1:33 PM, Andreas Ruprecht >> wrote: >>> On 07/03/2015 12:46, Ulf Magnusson wrote: >>>> >>>> Except for scat

<    1   2   3   4   >