From 6bfbf1c66fe321da5f7c6c8f815ea3d75107ed09 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Mon, 25 Jan 2016 16:12:49 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/13457 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer --- util/lint/kconfig_lint | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util/lint/kconfig_lint') 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} ); -- cgit v1.2.3