HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37365 )
Change subject: src: Add missing include <stddef.h> ......................................................................
src: Add missing include <stddef.h>
Also use <types.h> when <stdint.h> and <stddef.h> are needed. Some uneeded include <stdlib.h> removes.
Change-Id: I619ae22679d86a4d0b565a3717f0fb9aa487eb8b Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/arch/arm64/fit_payload.c M src/arch/x86/acpi_device.c M src/arch/x86/include/arch/early_variables.h M src/commonlib/mem_pool.c M src/commonlib/region.c M src/lib/coreboot_table.c M src/security/tpm/tspi/tspi.c M src/security/tpm/tss/tcg-2.0/tss_marshaling.c M src/soc/amd/stoneyridge/northbridge.c M src/soc/intel/skylake/pmutil.c M src/soc/qualcomm/ipq40xx/spi.c 11 files changed, 15 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/65/37365/1
diff --git a/src/arch/arm64/fit_payload.c b/src/arch/arm64/fit_payload.c index 4ade1c7..c9023a4 100644 --- a/src/arch/arm64/fit_payload.c +++ b/src/arch/arm64/fit_payload.c @@ -14,8 +14,8 @@
#include <console/console.h> #include <bootmem.h> -#include <stdlib.h> #include <program_loading.h> +#include <stddef.h> #include <string.h> #include <commonlib/compression.h> #include <commonlib/cbfs_serialized.h> diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c index d367108..f0b3127 100644 --- a/src/arch/x86/acpi_device.c +++ b/src/arch/x86/acpi_device.c @@ -20,6 +20,8 @@ #if CONFIG(GENERIC_GPIO_LIB) #include <gpio.h> #endif +#include <stddef.h> +#include <stdlib.h>
#define ACPI_DP_UUID "daffd814-6eba-4d8c-8a91-bc9bbf4aa301" #define ACPI_DP_CHILD_UUID "dbb8e3e6-5886-4ba6-8795-1319f52a966b" diff --git a/src/arch/x86/include/arch/early_variables.h b/src/arch/x86/include/arch/early_variables.h index 7393cc9..6025dd2 100644 --- a/src/arch/x86/include/arch/early_variables.h +++ b/src/arch/x86/include/arch/early_variables.h @@ -16,7 +16,7 @@
#include <arch/symbols.h> #include <commonlib/helpers.h> -#include <stdlib.h> +#include <stddef.h>
#if ENV_ROMSTAGE && CONFIG(CAR_GLOBAL_MIGRATION)
diff --git a/src/commonlib/mem_pool.c b/src/commonlib/mem_pool.c index 0aa821b..3040661 100644 --- a/src/commonlib/mem_pool.c +++ b/src/commonlib/mem_pool.c @@ -13,6 +13,8 @@
#include <commonlib/helpers.h> #include <commonlib/mem_pool.h> +#include <stddef.h> +#include <stdlib.h>
void *mem_pool_alloc(struct mem_pool *mp, size_t sz) { diff --git a/src/commonlib/region.c b/src/commonlib/region.c index 4a7e285..106357a 100644 --- a/src/commonlib/region.c +++ b/src/commonlib/region.c @@ -13,6 +13,8 @@
#include <commonlib/helpers.h> #include <commonlib/region.h> +#include <stddef.h> +#include <stdlib.h> #include <string.h>
int region_is_subregion(const struct region *p, const struct region *c) diff --git a/src/lib/coreboot_table.c b/src/lib/coreboot_table.c index 7245a63..edd5c47 100644 --- a/src/lib/coreboot_table.c +++ b/src/lib/coreboot_table.c @@ -27,11 +27,11 @@ #include <boardid.h> #include <device/device.h> #include <fmap.h> -#include <stdlib.h> #include <cbfs.h> #include <cbmem.h> #include <bootmem.h> #include <bootsplash.h> +#include <stddef.h> #include <spi_flash.h> #include <security/vboot/misc.h> #include <security/vboot/vbnv_layout.h> diff --git a/src/security/tpm/tspi/tspi.c b/src/security/tpm/tspi/tspi.c index 966b8b7..0ae1d84 100644 --- a/src/security/tpm/tspi/tspi.c +++ b/src/security/tpm/tspi/tspi.c @@ -19,12 +19,12 @@ #include <console/console.h> #include <security/tpm/tspi.h> #include <security/tpm/tss.h> -#include <stdlib.h> #if CONFIG(VBOOT) #include <vb2_api.h> #include <vb2_sha.h> #include <assert.h> #endif +#include <stddef.h>
#if CONFIG(TPM1) static uint32_t tpm1_invoke_state_machine(void) diff --git a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c index 720e7c4..9b4a42b 100644 --- a/src/security/tpm/tss/tcg-2.0/tss_marshaling.c +++ b/src/security/tpm/tss/tcg-2.0/tss_marshaling.c @@ -7,8 +7,9 @@
#include <commonlib/iobuf.h> #include <console/console.h> -#include <stdlib.h> +#include <stddef.h> #include <string.h> +#include <types.h>
#include "tss_marshaling.h" #include <security/tpm/tss/vendor/cr50/cr50.h> diff --git a/src/soc/amd/stoneyridge/northbridge.c b/src/soc/amd/stoneyridge/northbridge.c index 044a1b0..b988926 100644 --- a/src/soc/amd/stoneyridge/northbridge.c +++ b/src/soc/amd/stoneyridge/northbridge.c @@ -35,8 +35,8 @@ #include <soc/southbridge.h> #include <soc/pci_devs.h> #include <soc/iomap.h> +#include <stddef.h> #include <stdint.h> -#include <stdlib.h> #include <string.h> #include <arch/bert_storage.h>
diff --git a/src/soc/intel/skylake/pmutil.c b/src/soc/intel/skylake/pmutil.c index eb36e48..89582f9 100644 --- a/src/soc/intel/skylake/pmutil.c +++ b/src/soc/intel/skylake/pmutil.c @@ -29,7 +29,6 @@ #include <intelblocks/pmclib.h> #include <intelblocks/lpc_lib.h> #include <intelblocks/tco.h> -#include <stdlib.h> #include <soc/gpe.h> #include <soc/gpio.h> #include <soc/iomap.h> @@ -38,6 +37,7 @@ #include <soc/pmc.h> #include <soc/smbus.h> #include <security/vboot/vbnv.h> +#include <stddef.h>
#include "chip.h"
diff --git a/src/soc/qualcomm/ipq40xx/spi.c b/src/soc/qualcomm/ipq40xx/spi.c index b68e1cb..72a5b9d 100644 --- a/src/soc/qualcomm/ipq40xx/spi.c +++ b/src/soc/qualcomm/ipq40xx/spi.c @@ -33,7 +33,7 @@ #include <gpio.h> #include <soc/iomap.h> #include <soc/spi.h> -#include <stdlib.h> +#include <stddef.h>
static const struct blsp_spi spi_reg[] = { /* BLSP0 registers for SPI interface */