summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xutil/lint/kconfig_lint13
1 files changed, 3 insertions, 10 deletions
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 9e2c207866..a3495ce2bf 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -374,7 +374,7 @@ sub check_defaults {
# Symbols created/used inside a choice must not have a default set. The default is set by the choice itself.
if ($symbols{$sym}{choice}) {
show_error("Defining a default for symbol '$sym' at $filename:$line_no, used inside choice at "
- . "$symbols{$sym}{choice_loc}, is not allowed.");
+ . "$symbols{$sym}{choice}, is not allowed.");
}
# skip good defaults
@@ -802,15 +802,8 @@ sub add_symbol {
#initialize the symbol or increment the use count.
if ( ( !exists $symbols{$symbol} ) || ( !exists $symbols{$symbol}{count} ) ) {
$symbols{$symbol}{count} = 0;
- if ($inside_choice) {
- $symbols{$symbol}{choice} = 1;
-
- # remember the location of the choice
- $symbols{$symbol}{choice_loc} = $inside_choice;
- }
- else {
- $symbols{$symbol}{choice} = 0;
- }
+ # remember the location of the choice (or "")
+ $symbols{$symbol}{choice} = $inside_choice;
}
else {
$symbols{$symbol}{count}++;