Commit b2d00d7c authored by Dirk Gouders's avatar Dirk Gouders Committed by Masahiro Yamada
Browse files

kconfig: fix line numbers for if-entries in menu tree

The line numers for if-entries in the menu tree are off by one or more
lines which is confusing when debugging for correctness of unrelated changes.

According to the git log, commit a02f0570

 (kconfig: improve
error handling in the parser) was the last one that changed that part
of the parser and replaced

	"if_entry: T_IF expr T_EOL"
	"if_entry: T_IF expr nl"

but the commit message does not state why this has been done.

When reverting that part of the commit, only the line numers are
corrected (checked with cdebug = DEBUG_PARSE in zconf.y), otherwise
the menu tree remains unchanged (checked with zconfdump() enabled in

An example for the corrected line numbers:

drivers/soc/Kconfig:15:source drivers/soc/tegra/Kconfig

changes to:

drivers/soc/Kconfig:15:source drivers/soc/tegra/Kconfig
Signed-off-by: default avatarDirk Gouders <>
Signed-off-by: Masahiro Yamada's avatarMasahiro Yamada <>
parent 5391e536
......@@ -31,7 +31,7 @@ struct symbol *symbol_hash[SYMBOL_HASHSIZE];
static struct menu *current_menu, *current_entry;
%expect 32
%expect 31
......@@ -337,7 +337,7 @@ choice_block:
/* if entry */
if_entry: T_IF expr nl
if_entry: T_IF expr T_EOL
printd(DEBUG_PARSE, "%s:%d:if\n", zconf_curname(), zconf_lineno());
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment