Commit d5afb48
committed
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: Masahiro Yamada <[email protected]>1 parent d67624d commit d5afb48
1 file changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1107 | 1107 | | |
1108 | 1108 | | |
1109 | 1109 | | |
1110 | | - | |
| 1110 | + | |
| 1111 | + | |
| 1112 | + | |
1111 | 1113 | | |
1112 | 1114 | | |
1113 | | - | |
| 1115 | + | |
1114 | 1116 | | |
1115 | 1117 | | |
1116 | 1118 | | |
1117 | 1119 | | |
1118 | | - | |
| 1120 | + | |
1119 | 1121 | | |
1120 | 1122 | | |
1121 | 1123 | | |
1122 | | - | |
1123 | | - | |
| 1124 | + | |
1124 | 1125 | | |
1125 | 1126 | | |
1126 | 1127 | | |
1127 | | - | |
1128 | | - | |
| 1128 | + | |
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
1132 | 1132 | | |
1133 | 1133 | | |
1134 | | - | |
| 1134 | + | |
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | 1138 | | |
1139 | 1139 | | |
1140 | | - | |
| 1140 | + | |
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
| |||
0 commit comments