diff options
Diffstat (limited to 'util')
-rwxr-xr-x | util/lint/kconfig_lint | 4 | ||||
-rw-r--r-- | util/lint/kconfig_lint_README | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint index bbf3e38142..c9ccfb970e 100755 --- a/util/lint/kconfig_lint +++ b/util/lint/kconfig_lint @@ -788,6 +788,10 @@ sub add_symbol { show_error( "$symbol entry at $filename:$line_no has already been created outside a choice block " . "at $symbols{$symbol}{0}{file}:$symbols{$symbol}{0}{line_no}." ); } + elsif ( $inside_choice && $symbols{$symbol}{choice} ) { + show_error( "$symbol entry at $filename:$line_no has already been created inside another choice block " + . "at $symbols{$symbol}{0}{file}:$symbols{$symbol}{0}{line_no}." ); + } } # add the location of this instance diff --git a/util/lint/kconfig_lint_README b/util/lint/kconfig_lint_README index c36320edb2..5bd2bdd2c1 100644 --- a/util/lint/kconfig_lint_README +++ b/util/lint/kconfig_lint_README @@ -68,7 +68,8 @@ Errors in Kconfig files: - Choice block defined with no symbols. - The 'tristate' type is not used in coreboot. - A 'select' keyword used outside of a config block. -- Symbols created both inside and outside of a choice block. +- Symbols created both inside and outside of a choice block or in two + different choice blocks. - A 'range' keyword has higher minimum than maximum value. - A config block with a prompt at the top level (the top level is currently just for menus). |