HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33684
Change subject: src/mainboard: Use 'include <stdlib.h>' when appropriate ......................................................................
src/mainboard: Use 'include <stdlib.h>' when appropriate
Change-Id: I8a63f98c61eb7773ce94b4efc446b8d0149db5a9 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/amd/gardenia/gpio.c M src/mainboard/emulation/qemu-i440fx/fw_cfg.c M src/mainboard/esd/atom15/gpio.c M src/mainboard/google/kahlee/variants/baseboard/gpio.c M src/mainboard/google/slippy/variants/leon/romstage.c M src/mainboard/google/slippy/variants/peppy/romstage.c M src/mainboard/google/slippy/variants/wolf/romstage.c M src/mainboard/google/urara/boardid.c M src/mainboard/intel/bayleybay_fsp/gpio.c M src/mainboard/intel/kunimitsu/mainboard.c M src/mainboard/intel/minnowmax/gpio.c M src/mainboard/intel/strago/gpio.c M src/mainboard/lippert/frontrunner-af/sema.c M src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c M src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c M src/mainboard/roda/rk886ex/m3885.c M src/mainboard/scaleway/tagada/bmcinfo.c M src/mainboard/siemens/mc_tcu3/gpio.c M src/mainboard/sifive/hifive-unleashed/fixup_fdt.c M src/mainboard/ti/beaglebone/leds.c 20 files changed, 26 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/84/33684/1
diff --git a/src/mainboard/amd/gardenia/gpio.c b/src/mainboard/amd/gardenia/gpio.c index 7c5f47b..2013fa5 100644 --- a/src/mainboard/amd/gardenia/gpio.c +++ b/src/mainboard/amd/gardenia/gpio.c @@ -14,8 +14,8 @@ */
#include <soc/southbridge.h> -#include <stdlib.h> #include <soc/gpio.h> +#include <stddef.h>
#include "gpio.h"
diff --git a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c index 3acb11e..66c49ad 100644 --- a/src/mainboard/emulation/qemu-i440fx/fw_cfg.c +++ b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c @@ -18,6 +18,7 @@ #include <arch/io.h> #include <arch/acpi.h> #include <commonlib/endian.h> +#include <stdlib.h>
#include "fw_cfg.h" #include "fw_cfg_if.h" diff --git a/src/mainboard/esd/atom15/gpio.c b/src/mainboard/esd/atom15/gpio.c index b9c7829..248e6d8 100644 --- a/src/mainboard/esd/atom15/gpio.c +++ b/src/mainboard/esd/atom15/gpio.c @@ -14,8 +14,9 @@ * GNU General Public License for more details. */
-#include <stdlib.h> #include <soc/gpio.h> +#include <stddef.h> + #include "irqroute.h"
/* diff --git a/src/mainboard/google/kahlee/variants/baseboard/gpio.c b/src/mainboard/google/kahlee/variants/baseboard/gpio.c index 9db26c7..9916df4 100644 --- a/src/mainboard/google/kahlee/variants/baseboard/gpio.c +++ b/src/mainboard/google/kahlee/variants/baseboard/gpio.c @@ -16,7 +16,7 @@ #include <baseboard/variants.h> #include <soc/gpio.h> #include <soc/southbridge.h> -#include <stdlib.h> +#include <stddef.h> #include <boardid.h> #include <variant/gpio.h>
diff --git a/src/mainboard/google/slippy/variants/leon/romstage.c b/src/mainboard/google/slippy/variants/leon/romstage.c index b95c6e1..feb8c02 100644 --- a/src/mainboard/google/slippy/variants/leon/romstage.c +++ b/src/mainboard/google/slippy/variants/leon/romstage.c @@ -14,8 +14,8 @@ * GNU General Public License for more details. */
+#include <stddef.h> #include <stdint.h> -#include <stdlib.h> #include <string.h> #include <cbfs.h> #include <console/console.h> diff --git a/src/mainboard/google/slippy/variants/peppy/romstage.c b/src/mainboard/google/slippy/variants/peppy/romstage.c index 37c7853..6d180fd 100644 --- a/src/mainboard/google/slippy/variants/peppy/romstage.c +++ b/src/mainboard/google/slippy/variants/peppy/romstage.c @@ -14,8 +14,8 @@ * GNU General Public License for more details. */
+#include <stddef.h> #include <stdint.h> -#include <stdlib.h> #include <string.h> #include <cbfs.h> #include <console/console.h> diff --git a/src/mainboard/google/slippy/variants/wolf/romstage.c b/src/mainboard/google/slippy/variants/wolf/romstage.c index 731b357..4049b2d 100644 --- a/src/mainboard/google/slippy/variants/wolf/romstage.c +++ b/src/mainboard/google/slippy/variants/wolf/romstage.c @@ -14,8 +14,8 @@ * GNU General Public License for more details. */
+#include <stddef.h> #include <stdint.h> -#include <stdlib.h> #include <string.h> #include <cbfs.h> #include <console/console.h> diff --git a/src/mainboard/google/urara/boardid.c b/src/mainboard/google/urara/boardid.c index 9a6b64e..14298d4 100644 --- a/src/mainboard/google/urara/boardid.c +++ b/src/mainboard/google/urara/boardid.c @@ -14,9 +14,8 @@ * GNU General Public License for more details. */
-#include <stdlib.h> +#include <stddef.h> #include <string.h> - #include <boardid.h> #include <cbfs.h> #include <console/console.h> diff --git a/src/mainboard/intel/bayleybay_fsp/gpio.c b/src/mainboard/intel/bayleybay_fsp/gpio.c index 27b22c5..0ac1f9b 100644 --- a/src/mainboard/intel/bayleybay_fsp/gpio.c +++ b/src/mainboard/intel/bayleybay_fsp/gpio.c @@ -14,8 +14,9 @@ * GNU General Public License for more details. */
-#include <stdlib.h> #include <soc/gpio.h> +#include <stddef.h> + #include "irqroute.h"
/* NCORE GPIOs */ diff --git a/src/mainboard/intel/kunimitsu/mainboard.c b/src/mainboard/intel/kunimitsu/mainboard.c index 4c93051..801dbc8 100644 --- a/src/mainboard/intel/kunimitsu/mainboard.c +++ b/src/mainboard/intel/kunimitsu/mainboard.c @@ -19,9 +19,9 @@ #include <console/console.h> #include <device/device.h> #include <gpio.h> -#include <stdlib.h> #include <soc/nhlt.h> #include <vendorcode/google/chromeos/chromeos.h> + #include "ec.h" #include "gpio.h"
diff --git a/src/mainboard/intel/minnowmax/gpio.c b/src/mainboard/intel/minnowmax/gpio.c index b0f78c8..08b89d1 100644 --- a/src/mainboard/intel/minnowmax/gpio.c +++ b/src/mainboard/intel/minnowmax/gpio.c @@ -14,8 +14,9 @@ * GNU General Public License for more details. */
-#include <stdlib.h> #include <soc/gpio.h> +#include <stddef.h> + #include "irqroute.h"
/* diff --git a/src/mainboard/intel/strago/gpio.c b/src/mainboard/intel/strago/gpio.c index ed9ae4b..0fe55d2 100644 --- a/src/mainboard/intel/strago/gpio.c +++ b/src/mainboard/intel/strago/gpio.c @@ -16,8 +16,8 @@
#include "irqroute.h" #include <soc/gpio.h> -#include <stdlib.h> #include <boardid.h> + #include "onboard.h" #include "gpio.h"
diff --git a/src/mainboard/lippert/frontrunner-af/sema.c b/src/mainboard/lippert/frontrunner-af/sema.c index 757d8da..9924ec0 100644 --- a/src/mainboard/lippert/frontrunner-af/sema.c +++ b/src/mainboard/lippert/frontrunner-af/sema.c @@ -11,16 +11,15 @@ * GNU General Public License for more details. */
-#include <stdlib.h> #include <arch/io.h> #include <console/console.h> #include <device/device.h> #include <delay.h> #include <OEM.h> /* SMBUS0_BASE_ADDRESS */ - #include <Porting.h> #include <AGESA.h> #include <northbridge/amd/agesa/dimmSpd.h> + #include "sema.h"
/* Write data block to slave on SMBUS0. */ diff --git a/src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c b/src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c index 78d1ad6..32edaf5 100644 --- a/src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c +++ b/src/mainboard/opencellular/rotundu/variants/rotundu/gpio.c @@ -15,8 +15,9 @@ * GNU General Public License for more details. */
-#include <stdlib.h> #include <soc/gpio.h> +#include <stddef.h> + #include "../../irqroute.h"
/* NCORE GPIOs */ diff --git a/src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c b/src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c index c9d5426..e280e7c 100644 --- a/src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c +++ b/src/mainboard/opencellular/rotundu/variants/supabrckv1/gpio.c @@ -15,8 +15,9 @@ * GNU General Public License for more details. */
-#include <stdlib.h> #include <soc/gpio.h> +#include <stddef.h> + #include "../../irqroute.h"
#define GPIO_FUNC3_PULL_UP_20K GPIO_FUNC(3, PULL_UP, 20K) diff --git a/src/mainboard/roda/rk886ex/m3885.c b/src/mainboard/roda/rk886ex/m3885.c index 60a4f48..4b97dfc 100644 --- a/src/mainboard/roda/rk886ex/m3885.c +++ b/src/mainboard/roda/rk886ex/m3885.c @@ -15,12 +15,11 @@ */
#include <types.h> -#include <stdlib.h> #include <console/console.h> #include <arch/io.h> #include <delay.h> - #include <ec/acpi/ec.h> + #include "m3885.h"
#define TH0LOW 80 diff --git a/src/mainboard/scaleway/tagada/bmcinfo.c b/src/mainboard/scaleway/tagada/bmcinfo.c index 237d551..3530ff4 100644 --- a/src/mainboard/scaleway/tagada/bmcinfo.c +++ b/src/mainboard/scaleway/tagada/bmcinfo.c @@ -14,8 +14,8 @@ * */
+#include <stddef.h> #include <stdint.h> -#include <stdlib.h> #include <arch/early_variables.h> #include <console/console.h> #include <console/uart.h> diff --git a/src/mainboard/siemens/mc_tcu3/gpio.c b/src/mainboard/siemens/mc_tcu3/gpio.c index 23c6f96..d6d7106 100644 --- a/src/mainboard/siemens/mc_tcu3/gpio.c +++ b/src/mainboard/siemens/mc_tcu3/gpio.c @@ -14,8 +14,9 @@ * GNU General Public License for more details. */
-#include <stdlib.h> #include <soc/gpio.h> +#include <stddef.h> + #include "irqroute.h"
/* NCORE GPIOs */ diff --git a/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c b/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c index 8ac6ff1..3d43181 100644 --- a/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c +++ b/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c @@ -14,6 +14,7 @@ */
#include <stdint.h> +#include <stdlib.h> #include <string.h> #include <console/console.h> #include <soc/otp.h> diff --git a/src/mainboard/ti/beaglebone/leds.c b/src/mainboard/ti/beaglebone/leds.c index a4889b9..97b544a 100644 --- a/src/mainboard/ti/beaglebone/leds.c +++ b/src/mainboard/ti/beaglebone/leds.c @@ -13,8 +13,8 @@ */
#include <assert.h> +#include <commonlib/helpers.h> #include <cpu/ti/am335x/gpio.h> -#include <stdlib.h>
#include "leds.h"