HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33657
Change subject: arch: Add missing #include <commonlib/helpers.h> ......................................................................
arch: Add missing #include <commonlib/helpers.h>
ALIGN((a), b) and ALIGN_UP(a, b) needs 'helpers.h'
Change-Id: I029c7c5cbb19c7e69997b3d84f929cb61e8e2b23 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/arch/arm/armv7/mmu.c M src/arch/arm/cpu.c M src/arch/arm64/fit_payload.c M src/arch/x86/acpi.c M src/arch/x86/acpi_s3.c M src/arch/x86/gdt.c M src/arch/x86/include/arch/early_variables.h M src/arch/x86/pirq_routing.c M src/arch/x86/smbios.c M src/arch/x86/tables.c 10 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/33657/1
diff --git a/src/arch/arm/armv7/mmu.c b/src/arch/arm/armv7/mmu.c index ce9d3fd..b3133a0 100644 --- a/src/arch/arm/armv7/mmu.c +++ b/src/arch/arm/armv7/mmu.c @@ -29,6 +29,7 @@ */
#include <assert.h> +#include <commonlib/helpers.h> #include <stdlib.h> #include <stdint.h> #include <symbols.h> diff --git a/src/arch/arm/cpu.c b/src/arch/arm/cpu.c index fae1a37..118cae4 100644 --- a/src/arch/arm/cpu.c +++ b/src/arch/arm/cpu.c @@ -29,6 +29,7 @@ */ #include <stdlib.h> #include <arch/cpu.h> +#include <commonlib/helpers.h>
/* Return the CPU struct which is at the high memory address of the stack. */ diff --git a/src/arch/arm64/fit_payload.c b/src/arch/arm64/fit_payload.c index c4bbcee..410f7bb 100644 --- a/src/arch/arm64/fit_payload.c +++ b/src/arch/arm64/fit_payload.c @@ -20,6 +20,7 @@ #include <string.h> #include <commonlib/compression.h> #include <commonlib/cbfs_serialized.h> +#include <commonlib/helpers.h> #include <lib.h> #include <fit.h> #include <endian.h> diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index 1d645bb..8327e30 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -44,6 +44,7 @@ #include <arch/acpigen.h> #include <device/pci.h> #include <cbmem.h> +#include <commonlib/helpers.h> #include <cpu/x86/lapic_def.h> #include <cpu/cpu.h> #include <cbfs.h> diff --git a/src/arch/x86/acpi_s3.c b/src/arch/x86/acpi_s3.c index 4c57303..049fb12 100644 --- a/src/arch/x86/acpi_s3.c +++ b/src/arch/x86/acpi_s3.c @@ -18,6 +18,7 @@ #include <arch/acpi.h> #include <arch/cpu.h> #include <cbmem.h> +#include <commonlib/helpers.h> #include <fallback.h> #include <timestamp.h> #include <program_loading.h> diff --git a/src/arch/x86/gdt.c b/src/arch/x86/gdt.c index c9aec6d..e5444e8 100644 --- a/src/arch/x86/gdt.c +++ b/src/arch/x86/gdt.c @@ -16,6 +16,7 @@ #include <types.h> #include <string.h> #include <cbmem.h> +#include <commonlib/helpers.h> #include <console/console.h> #include <cpu/x86/gdt.h>
diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h index 9ea1537..424b11a 100644 --- a/src/arch/x86/include/arch/early_variables.h +++ b/src/arch/x86/include/arch/early_variables.h @@ -17,6 +17,7 @@ #define ARCH_EARLY_VARIABLES_H
#include <arch/symbols.h> +#include <commonlib/helpers.h> #include <stdlib.h>
#if ENV_CACHE_AS_RAM && !CONFIG(NO_CAR_GLOBAL_MIGRATION) diff --git a/src/arch/x86/pirq_routing.c b/src/arch/x86/pirq_routing.c index 194efb4..2bed69e 100644 --- a/src/arch/x86/pirq_routing.c +++ b/src/arch/x86/pirq_routing.c @@ -16,6 +16,7 @@ */ #include <console/console.h> #include <arch/pirq_routing.h> +#include <commonlib/helpers.h> #include <string.h> #include <device/pci.h>
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 54c2b09..d285d55 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -30,6 +30,7 @@ #include <memory_info.h> #include <spd.h> #include <cbmem.h> +#include <commonlib/helpers.h> #include <device/pci_ids.h> #include <device/pci_def.h> #include <device/pci.h> diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c index f17fb85..04da8c4 100644 --- a/src/arch/x86/tables.c +++ b/src/arch/x86/tables.c @@ -23,6 +23,7 @@ #include <arch/pirq_routing.h> #include <arch/smp/mpspec.h> #include <arch/acpi.h> +#include <commonlib/helpers.h> #include <string.h> #include <cbmem.h> #include <smbios.h>
Felix Held has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33657 )
Change subject: arch: Add missing #include <commonlib/helpers.h> ......................................................................
Patch Set 1: Code-Review+2
Felix Held has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/33657 )
Change subject: arch: Add missing #include <commonlib/helpers.h> ......................................................................
arch: Add missing #include <commonlib/helpers.h>
ALIGN((a), b) and ALIGN_UP(a, b) needs 'helpers.h'
Change-Id: I029c7c5cbb19c7e69997b3d84f929cb61e8e2b23 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/33657 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Felix Held felix-coreboot@felixheld.de --- M src/arch/arm/armv7/mmu.c M src/arch/arm/cpu.c M src/arch/arm64/fit_payload.c M src/arch/x86/acpi.c M src/arch/x86/acpi_s3.c M src/arch/x86/gdt.c M src/arch/x86/include/arch/early_variables.h M src/arch/x86/pirq_routing.c M src/arch/x86/smbios.c M src/arch/x86/tables.c 10 files changed, 10 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Felix Held: Looks good to me, approved
diff --git a/src/arch/arm/armv7/mmu.c b/src/arch/arm/armv7/mmu.c index ce9d3fd..b3133a0 100644 --- a/src/arch/arm/armv7/mmu.c +++ b/src/arch/arm/armv7/mmu.c @@ -29,6 +29,7 @@ */
#include <assert.h> +#include <commonlib/helpers.h> #include <stdlib.h> #include <stdint.h> #include <symbols.h> diff --git a/src/arch/arm/cpu.c b/src/arch/arm/cpu.c index 93d5675..87fc6b1 100644 --- a/src/arch/arm/cpu.c +++ b/src/arch/arm/cpu.c @@ -29,6 +29,7 @@ */ #include <stdlib.h> #include <arch/cpu.h> +#include <commonlib/helpers.h>
/* Return the CPU struct which is at the high memory address of the stack. */ diff --git a/src/arch/arm64/fit_payload.c b/src/arch/arm64/fit_payload.c index fd1bae1..46bea23 100644 --- a/src/arch/arm64/fit_payload.c +++ b/src/arch/arm64/fit_payload.c @@ -20,6 +20,7 @@ #include <string.h> #include <commonlib/compression.h> #include <commonlib/cbfs_serialized.h> +#include <commonlib/helpers.h> #include <lib.h> #include <fit.h> #include <endian.h> diff --git a/src/arch/x86/acpi.c b/src/arch/x86/acpi.c index 71fc4e2..80923e3 100644 --- a/src/arch/x86/acpi.c +++ b/src/arch/x86/acpi.c @@ -44,6 +44,7 @@ #include <arch/acpigen.h> #include <device/pci.h> #include <cbmem.h> +#include <commonlib/helpers.h> #include <cpu/x86/lapic_def.h> #include <cpu/cpu.h> #include <cbfs.h> diff --git a/src/arch/x86/acpi_s3.c b/src/arch/x86/acpi_s3.c index 4c57303..049fb12 100644 --- a/src/arch/x86/acpi_s3.c +++ b/src/arch/x86/acpi_s3.c @@ -18,6 +18,7 @@ #include <arch/acpi.h> #include <arch/cpu.h> #include <cbmem.h> +#include <commonlib/helpers.h> #include <fallback.h> #include <timestamp.h> #include <program_loading.h> diff --git a/src/arch/x86/gdt.c b/src/arch/x86/gdt.c index d3ad01e..81756ff 100644 --- a/src/arch/x86/gdt.c +++ b/src/arch/x86/gdt.c @@ -16,6 +16,7 @@ #include <types.h> #include <string.h> #include <cbmem.h> +#include <commonlib/helpers.h> #include <console/console.h> #include <cpu/x86/gdt.h>
diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h index b3042c3..a69c230 100644 --- a/src/arch/x86/include/arch/early_variables.h +++ b/src/arch/x86/include/arch/early_variables.h @@ -17,6 +17,7 @@ #define ARCH_EARLY_VARIABLES_H
#include <arch/symbols.h> +#include <commonlib/helpers.h> #include <stdlib.h>
#if ENV_CACHE_AS_RAM && !CONFIG(NO_CAR_GLOBAL_MIGRATION) diff --git a/src/arch/x86/pirq_routing.c b/src/arch/x86/pirq_routing.c index 70df201..15d7411 100644 --- a/src/arch/x86/pirq_routing.c +++ b/src/arch/x86/pirq_routing.c @@ -16,6 +16,7 @@ */ #include <console/console.h> #include <arch/pirq_routing.h> +#include <commonlib/helpers.h> #include <string.h> #include <device/pci.h>
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index be09021..2f5c3a6 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -30,6 +30,7 @@ #include <memory_info.h> #include <spd.h> #include <cbmem.h> +#include <commonlib/helpers.h> #include <device/pci_ids.h> #include <device/pci_def.h> #include <device/pci.h> diff --git a/src/arch/x86/tables.c b/src/arch/x86/tables.c index 3cc385b..0baa58e 100644 --- a/src/arch/x86/tables.c +++ b/src/arch/x86/tables.c @@ -23,6 +23,7 @@ #include <arch/pirq_routing.h> #include <arch/smp/mpspec.h> #include <arch/acpi.h> +#include <commonlib/helpers.h> #include <string.h> #include <cbmem.h> #include <smbios.h>
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33657 )
Change subject: arch: Add missing #include <commonlib/helpers.h> ......................................................................
Patch Set 2:
I think it is expected that <commonlib/helpers.h> is chain-included from <stddef.h> (which in turn is expected to be chain-included from <types.h>). I think we had this discussion with <stdint.h> vs. <types.h> before as well... it's a bit of a matter of taste and it's not done consistently throughout coreboot, but in my opinion it's not really useful to always have to include every single of these common infrastructure headers separately. There's a reason they have chain includes. I find it nice when I can just include <types.h> and know that I have all these common "toolbox" macros available without having to chase down every single one.