From 026978bce588f9d26d443fbacbf8dcc90957e331 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Sat, 14 May 2022 16:16:36 +0200 Subject: soc/intel/alderlake: Move array declaration Clang does not like array declarations inside plain switch cases. There are 2 options to fix this: use a block inside the switch statement, or declare it outside the switch statement. This does the latter. Change-Id: I9a02136fd63ac171b2bec4647c30c7eece930246 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/64349 Tested-by: build bot (Jenkins) Reviewed-by: Felix Singer --- src/soc/intel/alderlake/acpi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/alderlake/acpi.c b/src/soc/intel/alderlake/acpi.c index e588f803c7..39897e7abd 100644 --- a/src/soc/intel/alderlake/acpi.c +++ b/src/soc/intel/alderlake/acpi.c @@ -286,6 +286,7 @@ void soc_lpi_get_constraints(void *unused) acpigen_write_package(3); { + char path[32] = { 0 }; /* Emit the device path */ switch (dev->path.type) { case DEVICE_PATH_PCI: @@ -293,8 +294,6 @@ void soc_lpi_get_constraints(void *unused) break; case DEVICE_PATH_APIC: - char path[32] = {0}; - /* Lookup CPU id */ for (size_t i = 0; i < CONFIG_MAX_CPUS; i++) { if (cpu_get_apic_id(i) == dev->path.apic.apic_id) { -- cgit v1.2.3