Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit d5afb482 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

kconfig: refactor error messages in sym_check_print_recursive()


Improve the error messages and clean up redundant code.

[1] remove redundant next_sym->name checks

If 'next_sym' is a choice, the first 'if' block is executed. In the
subsequent 'else if' blocks, 'next_sym" is not a choice, hence
next_sym->name is not NULL.

[2] remove redundant sym->name checks

A choice is never selected or implied by anyone because it has no name
(it is syntactically impossible). If it is, sym->name is not NULL.

[3] Show the location of choice instead of "<choice>"

"part of choice <choice>" does not convey useful information. Since a
choice has no name, it is more informative to display the file name and
line number.

Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent d67624d8
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