kconfig_lint: Add warning if tristate type is used in coreboot

Although there's no reason we COULDN'T use tristate types, we haven't
up to this point.  If there's a good reason to use them in the future,
this check can be removed.

Change-Id: I5f1903341f522bc957e394bc0fd288ba1adab431
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/13460
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Martin Roth 2016-01-25 16:39:32 -07:00
parent 819e67242f
commit 08ee1cfafc
1 changed files with 4 additions and 0 deletions

View File

@ -949,6 +949,10 @@ sub handle_type {
my $expression; my $expression;
( $type, $expression ) = handle_if_line( $type, $inside_config, $filename, $line_no ); ( $type, $expression ) = handle_if_line( $type, $inside_config, $filename, $line_no );
if ( $type =~ /tristate/ ) {
show_warning("$filename:$line_no - tristate types are not used.");
}
if ($inside_config) { if ($inside_config) {
if ( exists( $symbols{$inside_config}{type} ) ) { if ( exists( $symbols{$inside_config}{type} ) ) {
if ( $symbols{$inside_config}{type} !~ /$type/ ) { if ( $symbols{$inside_config}{type} !~ /$type/ ) {