HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33681
Change subject: src/{device,drivers}: Use 'include <stdlib.h>' when appropriate ......................................................................
src/{device,drivers}: Use 'include <stdlib.h>' when appropriate
Change-Id: I99918a5a77e759bc7d4192d2c3fd6ad493c70248 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/device/device_util.c M src/device/oprom/realmode/x86.c M src/drivers/i2c/tpm/cr50.c M src/drivers/i2c/tpm/tis_atmel.c M src/drivers/smmstore/store.c M src/drivers/spi/flashconsole.c M src/drivers/spi/spi-generic.c M src/drivers/spi/spi_flash.c 8 files changed, 13 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/33681/1
diff --git a/src/device/device_util.c b/src/device/device_util.c index 47df305..fdb78fa 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -23,6 +23,7 @@ #include <device/path.h> #include <device/pci_def.h> #include <device/resource.h> +#include <stdlib.h> #include <string.h>
/** diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c index a7631a1..e002c47 100644 --- a/src/device/oprom/realmode/x86.c +++ b/src/device/oprom/realmode/x86.c @@ -28,6 +28,7 @@ #include <lib/jpeg.h> #include <pc80/i8259.h> #include <pc80/i8254.h> +#include <stdlib.h> #include <string.h> #include <vbe.h>
diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c index 19c8f6b..54d1f86 100644 --- a/src/drivers/i2c/tpm/cr50.c +++ b/src/drivers/i2c/tpm/cr50.c @@ -40,6 +40,8 @@ #include <endian.h> #include <timer.h> #include <security/tpm/tis.h> +#include <stdlib.h> + #include "tpm.h"
#define CR50_MAX_BUFSIZE 63 diff --git a/src/drivers/i2c/tpm/tis_atmel.c b/src/drivers/i2c/tpm/tis_atmel.c index 4456567..e4fc9e1 100644 --- a/src/drivers/i2c/tpm/tis_atmel.c +++ b/src/drivers/i2c/tpm/tis_atmel.c @@ -22,6 +22,8 @@ #include <endian.h> #include <lib.h> #include <security/tpm/tis.h> +#include <stddef.h> +#include <stdlib.h> #include <timer.h>
#define RECV_TIMEOUT (1 * 1000) /* 1 second */ diff --git a/src/drivers/smmstore/store.c b/src/drivers/smmstore/store.c index 833407d..377eebe 100644 --- a/src/drivers/smmstore/store.c +++ b/src/drivers/smmstore/store.c @@ -20,6 +20,8 @@ #include <commonlib/region.h> #include <console/console.h> #include <smmstore.h> +#include <stddef.h> +#include <stdlib.h>
/* * The region format is still not finalized, but so far it looks like this: diff --git a/src/drivers/spi/flashconsole.c b/src/drivers/spi/flashconsole.c index 3109012..b6351e3 100644 --- a/src/drivers/spi/flashconsole.c +++ b/src/drivers/spi/flashconsole.c @@ -19,6 +19,8 @@ #include <fmap.h> #include <console/console.h> #include <console/flash.h> +#include <stddef.h> +#include <stdlib.h>
#define LINE_BUFFER_SIZE 128 #define READ_BUFFER_SIZE 0x100 diff --git a/src/drivers/spi/spi-generic.c b/src/drivers/spi/spi-generic.c index 84a42d1..d4e17fc 100644 --- a/src/drivers/spi/spi-generic.c +++ b/src/drivers/spi/spi-generic.c @@ -16,6 +16,8 @@
#include <assert.h> #include <spi-generic.h> +#include <stddef.h> +#include <stdlib.h> #include <string.h>
int spi_claim_bus(const struct spi_slave *slave) diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c index a81306e..5afb2f7 100644 --- a/src/drivers/spi/spi_flash.c +++ b/src/drivers/spi/spi_flash.c @@ -12,7 +12,7 @@ #include <boot_device.h> #include <console/console.h> #include <cpu/x86/smm.h> -#include <stdlib.h> +#include <stddef.h> #include <string.h> #include <spi-generic.h> #include <spi_flash.h>
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/33681
to look at the new patch set (#4).
Change subject: src/{device,drivers}: Use 'include <stdlib.h>' when appropriate ......................................................................
src/{device,drivers}: Use 'include <stdlib.h>' when appropriate
Also, including <types.h>, is supposed to provide stdint and stddef.
Change-Id: I99918a5a77e759bc7d4192d2c3fd6ad493c70248 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/device/device_util.c M src/device/oprom/realmode/x86.c M src/drivers/i2c/tpm/cr50.c M src/drivers/i2c/tpm/tis_atmel.c M src/drivers/smmstore/store.c M src/drivers/spi/flashconsole.c M src/drivers/spi/spi-generic.c M src/drivers/spi/spi_flash.c 8 files changed, 13 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/81/33681/4
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/33681 )
Change subject: src/{device,drivers}: Use 'include <stdlib.h>' when appropriate ......................................................................
Patch Set 4: Code-Review+2
Martin Roth has submitted this change. ( https://review.coreboot.org/c/coreboot/+/33681 )
Change subject: src/{device,drivers}: Use 'include <stdlib.h>' when appropriate ......................................................................
src/{device,drivers}: Use 'include <stdlib.h>' when appropriate
Also, including <types.h>, is supposed to provide stdint and stddef.
Change-Id: I99918a5a77e759bc7d4192d2c3fd6ad493c70248 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr Reviewed-on: https://review.coreboot.org/c/coreboot/+/33681 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Martin Roth martinroth@google.com --- M src/device/device_util.c M src/device/oprom/realmode/x86.c M src/drivers/i2c/tpm/cr50.c M src/drivers/i2c/tpm/tis_atmel.c M src/drivers/smmstore/store.c M src/drivers/spi/flashconsole.c M src/drivers/spi/spi-generic.c M src/drivers/spi/spi_flash.c 8 files changed, 13 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Martin Roth: Looks good to me, approved
diff --git a/src/device/device_util.c b/src/device/device_util.c index df66f5c..d8a8431 100644 --- a/src/device/device_util.c +++ b/src/device/device_util.c @@ -16,6 +16,7 @@ #include <device/path.h> #include <device/pci_def.h> #include <device/resource.h> +#include <stdlib.h> #include <string.h>
/** diff --git a/src/device/oprom/realmode/x86.c b/src/device/oprom/realmode/x86.c index 8ba0241..1026ddb 100644 --- a/src/device/oprom/realmode/x86.c +++ b/src/device/oprom/realmode/x86.c @@ -21,6 +21,7 @@ #include <device/pci_ids.h> #include <pc80/i8259.h> #include <pc80/i8254.h> +#include <stdlib.h> #include <string.h> #include <vbe.h>
diff --git a/src/drivers/i2c/tpm/cr50.c b/src/drivers/i2c/tpm/cr50.c index 3c70b7e..6714bd4 100644 --- a/src/drivers/i2c/tpm/cr50.c +++ b/src/drivers/i2c/tpm/cr50.c @@ -29,7 +29,6 @@
#include <arch/early_variables.h> #include <commonlib/endian.h> -#include <stdint.h> #include <string.h> #include <types.h> #include <delay.h> @@ -38,6 +37,8 @@ #include <endian.h> #include <timer.h> #include <security/tpm/tis.h> +#include <stdlib.h> + #include "tpm.h"
#define CR50_MAX_BUFSIZE 63 diff --git a/src/drivers/i2c/tpm/tis_atmel.c b/src/drivers/i2c/tpm/tis_atmel.c index bfc25c4..42df292 100644 --- a/src/drivers/i2c/tpm/tis_atmel.c +++ b/src/drivers/i2c/tpm/tis_atmel.c @@ -13,7 +13,6 @@ */
#include <arch/early_variables.h> -#include <stdint.h> #include <assert.h> #include <commonlib/endian.h> #include <console/console.h> @@ -22,7 +21,9 @@ #include <endian.h> #include <lib.h> #include <security/tpm/tis.h> +#include <stdlib.h> #include <timer.h> +#include <types.h>
#define RECV_TIMEOUT (1 * 1000) /* 1 second */ #define XMIT_TIMEOUT (1 * 1000) /* 1 second */ diff --git a/src/drivers/smmstore/store.c b/src/drivers/smmstore/store.c index 3922746..dc4a0cf 100644 --- a/src/drivers/smmstore/store.c +++ b/src/drivers/smmstore/store.c @@ -18,6 +18,8 @@ #include <commonlib/region.h> #include <console/console.h> #include <smmstore.h> +#include <stdlib.h> +#include <types.h>
/* * The region format is still not finalized, but so far it looks like this: diff --git a/src/drivers/spi/flashconsole.c b/src/drivers/spi/flashconsole.c index 2a0d235..8874812 100644 --- a/src/drivers/spi/flashconsole.c +++ b/src/drivers/spi/flashconsole.c @@ -17,6 +17,8 @@ #include <fmap.h> #include <console/console.h> #include <console/flash.h> +#include <stdlib.h> +#include <types.h>
#define LINE_BUFFER_SIZE 128 #define READ_BUFFER_SIZE 0x100 diff --git a/src/drivers/spi/spi-generic.c b/src/drivers/spi/spi-generic.c index 2840218..05bfb82 100644 --- a/src/drivers/spi/spi-generic.c +++ b/src/drivers/spi/spi-generic.c @@ -14,6 +14,8 @@
#include <assert.h> #include <spi-generic.h> +#include <stddef.h> +#include <stdlib.h> #include <string.h>
int spi_claim_bus(const struct spi_slave *slave) diff --git a/src/drivers/spi/spi_flash.c b/src/drivers/spi/spi_flash.c index 88867fd..7b5266a 100644 --- a/src/drivers/spi/spi_flash.c +++ b/src/drivers/spi/spi_flash.c @@ -18,11 +18,11 @@ #include <boot/coreboot_tables.h> #include <console/console.h> #include <cpu/x86/smm.h> -#include <stdlib.h> #include <string.h> #include <spi-generic.h> #include <spi_flash.h> #include <timer.h> +#include <types.h>
#include "spi_flash_internal.h"