HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33686
Change subject: soc/intel: Use 'include <stdlib.h>' when appropriate ......................................................................
soc/intel: Use 'include <stdlib.h>' when appropriate
Change-Id: I71a5a6c3748d5a3910970bfb1ec3d7ecd3184cfd Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/soc/intel/baytrail/cpu.c M src/soc/intel/braswell/cpu.c M src/soc/intel/broadwell/me.c M src/soc/intel/cannonlake/memmap.c M src/soc/intel/cannonlake/pmutil.c M src/soc/intel/common/block/fast_spi/fast_spi.c M src/soc/intel/common/block/fast_spi/fast_spi_flash.c M src/soc/intel/common/smbios.c M src/soc/intel/fsp_baytrail/cpu.c M src/soc/intel/icelake/memmap.c M src/soc/intel/quark/i2c.c M src/soc/intel/skylake/me.c 12 files changed, 18 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/86/33686/1
diff --git a/src/soc/intel/baytrail/cpu.c b/src/soc/intel/baytrail/cpu.c index 9526932..681c2fe 100644 --- a/src/soc/intel/baytrail/cpu.c +++ b/src/soc/intel/baytrail/cpu.c @@ -13,7 +13,6 @@ * GNU General Public License for more details. */
-#include <stdlib.h> #include <console/console.h> #include <cpu/cpu.h> #include <cpu/intel/common/common.h> @@ -32,6 +31,7 @@ #include <soc/pattrs.h> #include <soc/ramstage.h> #include <soc/smm.h> +#include <stddef.h>
/* Core level MSRs */ const struct reg_script core_msr_script[] = { diff --git a/src/soc/intel/braswell/cpu.c b/src/soc/intel/braswell/cpu.c index 5f86a11..dd3346c 100644 --- a/src/soc/intel/braswell/cpu.c +++ b/src/soc/intel/braswell/cpu.c @@ -33,7 +33,7 @@ #include <soc/pattrs.h> #include <soc/ramstage.h> #include <soc/smm.h> -#include <stdlib.h> +#include <stddef.h>
/* Core level MSRs */ static const struct reg_script core_msr_script[] = { diff --git a/src/soc/intel/broadwell/me.c b/src/soc/intel/broadwell/me.c index dd5e5b8..05f69b5 100644 --- a/src/soc/intel/broadwell/me.c +++ b/src/soc/intel/broadwell/me.c @@ -39,7 +39,7 @@ #include <soc/ramstage.h> #include <soc/rcba.h> #include <soc/intel/broadwell/chip.h> - +#include <stdlib.h> #if CONFIG(CHROMEOS) #include <vendorcode/google/chromeos/chromeos.h> #include <vendorcode/google/chromeos/gnvs.h> diff --git a/src/soc/intel/cannonlake/memmap.c b/src/soc/intel/cannonlake/memmap.c index 3cae54f..a5e1981 100644 --- a/src/soc/intel/cannonlake/memmap.c +++ b/src/soc/intel/cannonlake/memmap.c @@ -25,7 +25,7 @@ #include <soc/pci_devs.h> #include <soc/smm.h> #include <soc/systemagent.h> -#include <stdlib.h> +#include <stddef.h>
#include "chip.h"
diff --git a/src/soc/intel/cannonlake/pmutil.c b/src/soc/intel/cannonlake/pmutil.c index ab36c70..2777e93 100644 --- a/src/soc/intel/cannonlake/pmutil.c +++ b/src/soc/intel/cannonlake/pmutil.c @@ -30,7 +30,6 @@ #include <intelblocks/pmclib.h> #include <intelblocks/rtc.h> #include <intelblocks/tco.h> -#include <stdlib.h> #include <soc/gpe.h> #include <soc/gpio.h> #include <soc/iomap.h> @@ -39,6 +38,7 @@ #include <soc/pm.h> #include <soc/smbus.h> #include <security/vboot/vbnv.h> +#include <stddef.h>
#include "chip.h"
diff --git a/src/soc/intel/common/block/fast_spi/fast_spi.c b/src/soc/intel/common/block/fast_spi/fast_spi.c index 58e7db7..f4fdb84 100644 --- a/src/soc/intel/common/block/fast_spi/fast_spi.c +++ b/src/soc/intel/common/block/fast_spi/fast_spi.c @@ -23,9 +23,9 @@ #include <intelblocks/fast_spi.h> #include <lib.h> #include <soc/pci_devs.h> +#include <stddef.h> #include <spi_flash.h> #include <spi-generic.h> -#include <stdlib.h>
/* * Get the FAST_SPIBAR. diff --git a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c index 0a43442..e0b6ba9 100644 --- a/src/soc/intel/common/block/fast_spi/fast_spi_flash.c +++ b/src/soc/intel/common/block/fast_spi/fast_spi_flash.c @@ -19,6 +19,8 @@ #include <intelblocks/fast_spi.h> #include <soc/pci_devs.h> #include <spi_flash.h> +#include <stddef.h> +#include <stdlib.h> #include <string.h> #include <timer.h>
diff --git a/src/soc/intel/common/smbios.c b/src/soc/intel/common/smbios.c index d315e15..50ba04a 100644 --- a/src/soc/intel/common/smbios.c +++ b/src/soc/intel/common/smbios.c @@ -13,11 +13,14 @@ * GNU General Public License for more details. */
-#include <smbios.h> -#include "smbios.h" -#include <string.h> #include <console/console.h> #include <device/dram/ddr3.h> +#include <smbios.h> +#include <stddef.h> +#include <stdlib.h> +#include <string.h> + +#include "smbios.h"
/* Fill the SMBIOS memory information from FSP MEM_INFO_DATA_HOB in CBMEM.*/ void dimm_info_fill(struct dimm_info *dimm, u32 dimm_capacity, u8 ddr_type, diff --git a/src/soc/intel/fsp_baytrail/cpu.c b/src/soc/intel/fsp_baytrail/cpu.c index 15dc851..12dd724 100644 --- a/src/soc/intel/fsp_baytrail/cpu.c +++ b/src/soc/intel/fsp_baytrail/cpu.c @@ -14,7 +14,6 @@ * GNU General Public License for more details. */
-#include <stdlib.h> #include <console/console.h> #include <cpu/cpu.h> #include <cpu/intel/microcode.h> @@ -31,6 +30,7 @@ #include <soc/pattrs.h> #include <soc/ramstage.h> #include <soc/smm.h> +#include <stddef.h>
/* Core level MSRs */ static const struct reg_script core_msr_script[] = { diff --git a/src/soc/intel/icelake/memmap.c b/src/soc/intel/icelake/memmap.c index f446708..917f487 100644 --- a/src/soc/intel/icelake/memmap.c +++ b/src/soc/intel/icelake/memmap.c @@ -24,7 +24,7 @@ #include <soc/pci_devs.h> #include <soc/smm.h> #include <soc/systemagent.h> -#include <stdlib.h> +#include <stddef.h>
#include "chip.h"
diff --git a/src/soc/intel/quark/i2c.c b/src/soc/intel/quark/i2c.c index bb1a264..929d3ff 100644 --- a/src/soc/intel/quark/i2c.c +++ b/src/soc/intel/quark/i2c.c @@ -22,6 +22,7 @@ #include <soc/i2c.h> #include <soc/ramstage.h> #include <soc/reg_access.h> +#include <stdlib.h> #include <timer.h>
static void i2c_disable(I2C_REGS *regs) diff --git a/src/soc/intel/skylake/me.c b/src/soc/intel/skylake/me.c index f7aa584..c8622f7 100644 --- a/src/soc/intel/skylake/me.c +++ b/src/soc/intel/skylake/me.c @@ -22,8 +22,8 @@ #include <soc/iomap.h> #include <soc/me.h> #include <soc/pci_devs.h> +#include <stddef.h> #include <stdint.h> -#include <stdlib.h> #include <string.h>
static inline u32 me_read_config32(int offset)