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@google.com> Reviewed-on: https://review.coreboot.org/13457 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
parent
63ea4930e4
commit
6bfbf1c66f
|
@ -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} );
|
||||
|
||||
|
|
Loading…
Reference in New Issue