summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2021-07-17 11:43:44 +0200
committerMartin Roth <martinroth@google.com>2021-10-18 19:33:57 +0000
commit967730f5656e433094d97e65ce6927734d7112c7 (patch)
treee65ad0d270deab800ac298e6a4732678a0c19e8a /util
parentdcb26139cad89f078403c375b5cb8ca38456caaf (diff)
downloadcoreboot-967730f5656e433094d97e65ce6927734d7112c7.tar.gz
coreboot-967730f5656e433094d97e65ce6927734d7112c7.tar.bz2
coreboot-967730f5656e433094d97e65ce6927734d7112c7.zip
kconfig_lint: Drop overly restrictive rule about choice configs
This rule was creating trouble: * A symbol may only be declared inside or outside a choice. The linter treats every occurence of a `config` entry as a symbol declaration, even when it's just setting a default or adding selects. This is not easy to fix as the symbol objects are not created first and then added to the $symbols array when we know what kind of decla- ration we have, but are created incrementally inside this global list. Change-Id: I48a17f6403470251be6b6d44bb82a8bdcbefe9f6 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/56410 Reviewed-by: Michael Niewöhner <foss@mniewoehner.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/lint/kconfig_lint11
1 files changed, 1 insertions, 10 deletions
diff --git a/util/lint/kconfig_lint b/util/lint/kconfig_lint
index 7f26ef298f49..76dd78764c4a 100755
--- a/util/lint/kconfig_lint
+++ b/util/lint/kconfig_lint
@@ -814,16 +814,7 @@ sub add_symbol {
}
else {
$symbols{$symbol}{count}++;
-
- if ( $inside_choice && !$symbols{$symbol}{choice} ) {
- show_error( "$symbol entry at $filename:$line_no has already been created inside a choice block "
- . "at $symbols{$symbol}{0}{file}:$symbols{$symbol}{0}{line_no}." );
- }
- elsif ( !$inside_choice && $symbols{$symbol}{choice} ) {
- show_error( "$symbol entry at $filename:$line_no has already been created outside a choice block "
- . "at $symbols{$symbol}{0}{file}:$symbols{$symbol}{0}{line_no}." );
- }
- elsif ( $inside_choice && $symbols{$symbol}{choice} ) {
+ if ( $inside_choice && $symbols{$symbol}{choice} ) {
show_error( "$symbol entry at $filename:$line_no has already been created inside another choice block "
. "at $symbols{$symbol}{0}{file}:$symbols{$symbol}{0}{line_no}." );
}