[coreboot-gerrit] Patch set updated for coreboot: kconfig_lint: demote 'always defined' errors to warnings

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Tue Feb 2 18:46:51 CET 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13541

-gerrit

commit 1b4921fcb7b6d323300b70aeb2594451c988ce55
Author: Martin Roth <martinroth at google.com>
Date:   Sun Jan 31 10:44:33 2016 -0700

    kconfig_lint: demote 'always defined' errors to warnings
    
    To be able to rrun this as a lint-stable test, demote these to warnings
    for now.  After the current CONFIG_MAINBOARD_POWER_ON_AFTER_POWER_FAIL
    issues get fixed, these can be promoted again.
    
    Change-Id: I1432980eb0c871fc61c12dcc351f8d46513a7965
    Signed-off-by: Martin Roth <martinroth at google.com>
---
 util/lint/kconfig_lint        | 4 ++--
 util/lint/kconfig_lint_README | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 787ab6a..b5a62d3 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -186,7 +186,7 @@ sub check_for_ifdef {
             my $symbol = $3;
 
             if ( ( exists $symbols{$symbol} ) && ( $symbols{$symbol}{type} ne "string" ) ) {
-                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." );
             }
         }
@@ -205,7 +205,7 @@ sub check_for_ifdef {
               if ( $line =~ /^([^:]+):(\d+):.+defined\s*\(\s*CONFIG_$symbol.*(&&|\|\|)\s*!?\s*\(?\s*CONFIG_$symbol/ );
 
             if ( ( exists $symbols{$symbol} ) && ( $symbols{$symbol}{type} ne "string" ) ) {
-                show_error( "defined 'CONFIG_$symbol' used at $file:$lineno."
+                show_warning( "defined 'CONFIG_$symbol' used at $file:$lineno."
                       . "  Symbols of type '$symbols{$symbol}{type}' are always defined." );
             }
         }
diff --git a/util/lint/kconfig_lint_README b/util/lint/kconfig_lint_README
index 3c638f5..5a5eacd 100644
--- a/util/lint/kconfig_lint_README
+++ b/util/lint/kconfig_lint_README
@@ -57,6 +57,8 @@ Warnings in coreboot source files:
   symbols.
 - 'IS_ENABLED()' block that could not be interpreted.
 - Kconfig files that are not loaded by a 'source' keyword.
+- '#ifdef' or '#if defined' used on bool, int, or hex - these are always
+  defined in coreboot's version of Kconfig.
 
 Errors in Kconfig files:
 - Selects do not work on symbols created in a choice block.
@@ -89,8 +91,6 @@ Errors in Kconfig that are also caught by Kconfig itself:
 - Using a 'prompt' keyword not inside a config or choice block.
 
 Errors in coreboot source files:
-- '#ifdef' or '#if defined' used on bool, int, or hex - these are always
-  defined in coreboot's version of Kconfig.
 - The IS_ENABLED macro is only valid for bool symbols.
 - The IS_ENABLED used on unknown CONFIG_ value, like an obsolete symbol.
 - The IS_ENABLED macro is used on a symbol without the CONFIG_ prefix.



More information about the coreboot-gerrit mailing list