Revert "util/lint/kconfig_lint: change warning levels and text"
This reverts commit dfdb0733a6a71b11d15006dafc13841e84fab7cd. Change-Id: I91bf5e42f4ac241f544742ce161bae651f9f9947 Reviewed-on: https://review.coreboot.org/16868 Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Tested-by: build bot (Jenkins)
This commit is contained in:
parent
6d6c00a502
commit
a7d0027083
|
@ -197,14 +197,11 @@ sub check_for_ifdef {
|
||||||
my $symbol = $3;
|
my $symbol = $3;
|
||||||
|
|
||||||
if ( ( exists $symbols{$symbol} ) && ( $symbols{$symbol}{type} ne "string" ) ) {
|
if ( ( exists $symbols{$symbol} ) && ( $symbols{$symbol}{type} ne "string" ) ) {
|
||||||
# TODO: Remove special check for CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL
|
show_warning( "#ifdef 'CONFIG_$symbol' used at $file:$lineno."
|
||||||
if ($symbol ne "MAINBOARD_POWER_ON_AFTER_POWER_FAIL") {
|
|
||||||
show_error( "#ifdef 'CONFIG_$symbol' used at $file:$lineno."
|
|
||||||
. " Symbols of type '$symbols{$symbol}{type}' are always defined." );
|
. " Symbols of type '$symbols{$symbol}{type}' are always defined." );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
# look for (#if) defined SYMBOL
|
# look for (#if) defined SYMBOL
|
||||||
@ifdef_symbols = @collected_symbols;
|
@ifdef_symbols = @collected_symbols;
|
||||||
|
@ -264,10 +261,7 @@ sub check_for_def {
|
||||||
my $symbol = $3;
|
my $symbol = $3;
|
||||||
|
|
||||||
if ( ( exists $symbols{$symbol} ) ) {
|
if ( ( exists $symbols{$symbol} ) ) {
|
||||||
# TODO: Remove special check for CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL
|
show_warning("#define of symbol 'CONFIG_$symbol' used at $file:$lineno.");
|
||||||
if ($symbol ne "MAINBOARD_POWER_ON_AFTER_POWER_FAIL") {
|
|
||||||
show_error("#define of symbol 'CONFIG_$symbol' used at $file:$lineno.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
show_warning( "#define 'CONFIG_$symbol' used at $file:$lineno."
|
show_warning( "#define 'CONFIG_$symbol' used at $file:$lineno."
|
||||||
|
@ -466,9 +460,7 @@ sub check_used_symbols {
|
||||||
for ( my $i = 0 ; $i <= $symbols{$key}{count} ; $i++ ) {
|
for ( my $i = 0 ; $i <= $symbols{$key}{count} ; $i++ ) {
|
||||||
my $filename = $symbols{$key}{$i}{file};
|
my $filename = $symbols{$key}{$i}{file};
|
||||||
my $line_no = $symbols{$key}{$i}{line_no};
|
my $line_no = $symbols{$key}{$i}{line_no};
|
||||||
if ($show_note_output) {
|
show_warning("Unused symbol '$key' referenced at $filename:$line_no.");
|
||||||
print("#!!!!! Note: Unused symbol '$key' defined at $filename:$line_no.");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1170,9 +1162,9 @@ sub load_kconfig_file {
|
||||||
#if the file exists, try to load it.
|
#if the file exists, try to load it.
|
||||||
elsif ( -e "$input_file" ) {
|
elsif ( -e "$input_file" ) {
|
||||||
|
|
||||||
#throw an error if the file has already been loaded.
|
#throw a warning if the file has already been loaded.
|
||||||
if ( exists $loaded_files{$input_file} ) {
|
if ( exists $loaded_files{$input_file} ) {
|
||||||
show_error("'$input_file' sourced at $loadfile:$loadline was already loaded by $loaded_files{$input_file}");
|
show_warning("'$input_file' sourced at $loadfile:$loadline was already loaded by $loaded_files{$input_file}");
|
||||||
}
|
}
|
||||||
|
|
||||||
#load the file's contents and mark the file as loaded for checking later
|
#load the file's contents and mark the file as loaded for checking later
|
||||||
|
|
Loading…
Reference in New Issue