diff options
author | Martin Roth <martinroth@google.com> | 2016-01-25 16:12:49 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-01-30 17:26:34 +0100 |
commit | 6bfbf1c66fe321da5f7c6c8f815ea3d75107ed09 (patch) | |
tree | 636d05294e46bae33b03775d93737bc86f59f5c5 /util/lint | |
parent | 63ea4930e4ea127a317268de58371848944880a2 (diff) |
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>
Diffstat (limited to 'util/lint')
-rwxr-xr-x | util/lint/kconfig_lint | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint index 4315768709..44e898fa40 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} ); |