From b8c626ce781547f6755a7e15e2a01070433ea034 Mon Sep 17 00:00:00 2001 From: Paul Bolle Date: Thu, 8 Nov 2018 13:32:16 +0100 Subject: [PATCH] Adjust grep pattern for finding Kconfig symbols This script detects unknown Kconfig symbols by checking whether the Kconfig macros used in the various *.config files have a corresponding Kconfig symbol in the tree. Its core test is done with grep(). It turns out that match pattern used in grep() is too broad. For instance, it doesn't report CONFIG_ACPI_PROCFS as unknown because there is a Kconfig entry for ACPI_PROCFS_POWER in the tree. Make the pattern match Kconfig symbols exactly to correct this. Signed-off-by: Paul Bolle --- scripts/check-configs.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check-configs.pl b/scripts/check-configs.pl index 39df8f4ad..c74acf1d4 100644 --- a/scripts/check-configs.pl +++ b/scripts/check-configs.pl @@ -74,7 +74,7 @@ sub main { my (@tmp) = parse_shipped( $shipped ); foreach my $ref ( @tmp ) { say( STDERR "$shipped:$ref->[0]: No Kconfig symbol matches 'CONFIG_$ref->[1]'" ) - unless (grep( /$ref->[1]/, keys( %configs ))); + unless (grep( /^$ref->[1]$/, keys( %configs ))); } }