[coreboot-gerrit] New patch to review for coreboot: kconfig_lint: Exclude some Kconfig symbols from unused symbol checks
Martin Roth (martinroth@google.com)
gerrit at coreboot.org
Tue Jan 26 04:17: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/13457
-gerrit
commit a70eaa603365ee9b36eec53af96a1f87ccf6ef07
Author: Martin Roth <martinroth at google.com>
Date: Mon Jan 25 16:12:49 2016 -0700
kconfig_lint: Exclude some Kconfig symbols from unused symbol checks
The configuration that coreboot uses for setting selected symbols
typically involves a structure like this:
config BLEH_SPECIFIC_OPTIONS
def_bool y
select SYMBOL
This leads to an an extra kconfig symbol BLEH_SPECIFIC_OPTIONS
that is never referenced by anything else, generating a warning.
Since this is currently the construct that coreboot uses, filter it
out of the warnings for now.
Change-Id: I85a95e4c4e8469870c7f219f2a92955819845573
Signed-off-by: Martin Roth <martinroth at google.com>
---
util/lint/kconfig_lint | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 4315768..44e898f 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -51,6 +51,8 @@ my %used_symbols; # structure of symbols used in the tree, and where th
my @collected_symbols; #
my %selected_symbols; # list of symbols that are enabled by a select statement
+my $exclude_unused = '_SPECIFIC_OPTIONS|SOUTH_BRIDGE_OPTIONS';
+
Main();
#-------------------------------------------------------------------------------
@@ -380,6 +382,10 @@ sub check_used_symbols {
# loop through all defined symbols and see if they're used anywhere
foreach my $key ( sort ( keys %symbols ) ) {
+ if ( $key =~ /$exclude_unused/ ) {
+ next;
+ }
+
#see if they're used internal to Kconfig
next if ( exists $referenced_symbols{$key} );
More information about the coreboot-gerrit
mailing list