Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16868
-gerrit
commit 850c4f7613a2b808ef762d9402d301e08e25b40e
Author: Martin Roth <martinroth(a)google.com>
Date: Mon Oct 3 23:00:04 2016 +0200
Revert "util/lint/kconfig_lint: change warning levels and text"
This reverts commit dfdb0733a6a71b11d15006dafc13841e84fab7cd.
Change-Id: I91bf5e42f4ac241f544742ce161bae651f9f9947
---
util/lint/kconfig_lint | 18 +++++-------------
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 39a0291..064f3db 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -197,11 +197,8 @@ sub check_for_ifdef {
my $symbol = $3;
if ( ( exists $symbols{$symbol} ) && ( $symbols{$symbol}{type} ne "string" ) ) {
- # TODO: Remove special check for CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL
- if ($symbol ne "MAINBOARD_POWER_ON_AFTER_POWER_FAIL") {
- show_error( "#ifdef 'CONFIG_$symbol' used at $file:$lineno."
+ show_warning( "#ifdef 'CONFIG_$symbol' used at $file:$lineno."
. " Symbols of type '$symbols{$symbol}{type}' are always defined." );
- }
}
}
}
@@ -264,10 +261,7 @@ sub check_for_def {
my $symbol = $3;
if ( ( exists $symbols{$symbol} ) ) {
- # TODO: Remove special check for CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL
- if ($symbol ne "MAINBOARD_POWER_ON_AFTER_POWER_FAIL") {
- show_error("#define of symbol 'CONFIG_$symbol' used at $file:$lineno.");
- }
+ show_warning("#define of symbol 'CONFIG_$symbol' used at $file:$lineno.");
}
else {
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++ ) {
my $filename = $symbols{$key}{$i}{file};
my $line_no = $symbols{$key}{$i}{line_no};
- if ($show_note_output) {
- print("#!!!!! Note: Unused symbol '$key' defined at $filename:$line_no.");
- }
+ show_warning("Unused symbol '$key' referenced at $filename:$line_no.");
}
}
}
@@ -1170,9 +1162,9 @@ sub load_kconfig_file {
#if the file exists, try to load it.
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} ) {
- 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
the following patch was just integrated into master:
commit 6d6c00a50237dd8c9102fd24cb183ceda1aa90ac
Author: Martin Roth <martinroth(a)google.com>
Date: Fri Sep 30 14:51:24 2016 -0600
google/gale: Remove #ifdef of Kconfig bool symbol
Kconfig symbols of type bool are ALWAYS defined, so this code was
always being included and run, which isn't what the author wanted.
Change to use IS_ENABLED(), and a regular if() instead of an #ifdef.
Change-Id: I72623fa27e47980c602135f4b73f371c7f50139b
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/16837
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/16837 for details.
-gerrit
the following patch was just integrated into master:
commit 8bc8be4d0ecd2c939a36f2846ef85d6f469180eb
Author: Martin Roth <martinroth(a)google.com>
Date: Fri Sep 30 15:56:27 2016 -0600
util/lint/kconfig_lint: change warning levels and text
- Add an exception for MAINBOARD_POWER_ON_AFTER_POWER_FAIL when checking
- With those exceptions set, we don't have anymore #define or #ifdef
warnings, so turn them to errors so no more can be pushed.
- Change the definition of an unused symbol from a warning to a note.
There are times when unused symbols are expected.
- Upgrade the warning for loading Kconfig files multiple times from
a warning to an error.
Change-Id: I6dcb06d4f0b099d5ccaf7643e72dd790719bdf58
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/16840
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/16840 for details.
-gerrit
the following patch was just integrated into master:
commit fa95625867fa1f373e8c5d8ec160a65e50a3d5c2
Author: Martin Roth <martinroth(a)google.com>
Date: Fri Sep 30 15:51:32 2016 -0600
util/lint/kconfig_lint: Check default types
The type of the default value wasn't being checked to make sure that it
matched the type of the Kconfig symbol.
This makes sure that the symbol is being set to either a reasonable
looking value or to another Kconfig symbol.
Change-Id: Ia01bd2d8b387f319d29f0a005d55cb8e20cd3853
Signed-off-by: Martin Roth <martinroth(a)google.com>
Reviewed-on: https://review.coreboot.org/16839
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/16839 for details.
-gerrit