
Hello HAOUAS Elyes, Julius Werner, Angel Pons, Patrick Georgi, I'd like you to do a code review. Please visit https://review.coreboot.org/c/coreboot/+/32229 to review the following change. Change subject: kconfig_lint: Make usage of IS_ENABLED() an error ...................................................................... kconfig_lint: Make usage of IS_ENABLED() an error Warnings are not caught by our pre-commit hook. Change-Id: Id30ffa0089cec6c24fc3dbbb10a1be35f63b3d89 Signed-off-by: Nico Huber <nico.h@gmx.de> --- M util/lint/kconfig_lint 1 file changed, 1 insertion(+), 13 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/29/32229/1 diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint index 4d0a755..25b77bc 100755 --- a/util/lint/kconfig_lint +++ b/util/lint/kconfig_lint @@ -328,19 +328,7 @@ while ( $line =~ /(.*)IS_ENABLED\s*\(\s*CONFIG_(\w+)(.*)/ ) { my $symbol = $2; $line = $1 . $3; - - #make sure that the type is bool - if ( exists $symbols{$symbol} ) { - if ( $symbols{$symbol}{type} ne "bool" ) { - show_error( "IS_ENABLED(CONFIG_$symbol) used at $file:$lineno." - . " IS_ENABLED is only valid for type 'bool', not '$symbols{$symbol}{type}'." ); - } else { - show_warning("IS_ENABLED(CONFIG_$symbol) at $file:$lineno is deprecated. Use CONFIG($symbol) instead." ); - } - } - else { - show_error("IS_ENABLED() used on unknown value CONFIG_$symbol at $file:$lineno."); - } + show_error("IS_ENABLED(CONFIG_$symbol) at $file:$lineno is deprecated. Use CONFIG($symbol) instead."); } } elsif ( $line =~ /^([^:]+):(\d+):\s*#\s*(?:el)?if\s+!?\s*\(?\s*CONFIG_(\w+)\)?(\s*==\s*1)?.*?$/ ) { my $file = $1; -- To view, visit https://review.coreboot.org/c/coreboot/+/32229 To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: Id30ffa0089cec6c24fc3dbbb10a1be35f63b3d89 Gerrit-Change-Number: 32229 Gerrit-PatchSet: 1 Gerrit-Owner: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com> Gerrit-Reviewer: HAOUAS Elyes <ehaouas@noos.fr> Gerrit-Reviewer: Julius Werner <jwerner@chromium.org> Gerrit-Reviewer: Martin Roth <martinroth@google.com> Gerrit-Reviewer: Nico Huber <nico.h@gmx.de> Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com> Gerrit-MessageType: newchange