Elyes Haouas has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/68208 )
Change subject: src/lib: Clean up includes ......................................................................
src/lib: Clean up includes
Signed-off-by: Elyes Haouas ehaouas@noos.fr Change-Id: I729959f6ba4b48f58d4e4e3a1fb1e4c33cb57dbb --- M src/lib/boot_device.c M src/lib/dimm_info_util.c M src/lib/edid_fill_fb.c M src/lib/ext_stage_cache.c M src/lib/hexdump.c M src/lib/hexstrtobin.c M src/lib/malloc.c M src/lib/master_header_pointer.c M src/lib/prog_loaders.c M src/lib/stack.c M src/lib/timestamp.c M src/lib/uuid.c M src/lib/version.c 13 files changed, 34 insertions(+), 6 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/68208/1
diff --git a/src/lib/boot_device.c b/src/lib/boot_device.c index ee8ba75..bb2eb88 100644 --- a/src/lib/boot_device.c +++ b/src/lib/boot_device.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <boot_device.h> +#include <stddef.h>
void __weak boot_device_init(void) { diff --git a/src/lib/dimm_info_util.c b/src/lib/dimm_info_util.c index 3507366..9d4b186b 100644 --- a/src/lib/dimm_info_util.c +++ b/src/lib/dimm_info_util.c @@ -1,10 +1,12 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <commonlib/bsd/helpers.h> #include <device/dram/spd.h> #include <dimm_info_util.h> #include <smbios.h> #include <spd.h> #include <console/console.h> +#include <stdint.h>
uint8_t smbios_bus_width_to_spd_width(uint8_t ddr_type, uint16_t total_width, uint16_t data_width) diff --git a/src/lib/edid_fill_fb.c b/src/lib/edid_fill_fb.c index 1df37e8..f2d0e6e 100644 --- a/src/lib/edid_fill_fb.c +++ b/src/lib/edid_fill_fb.c @@ -7,6 +7,7 @@ #include <string.h> #include <stdlib.h> #include <list.h> +#include <stdint.h>
struct fb_info { struct list_node node; diff --git a/src/lib/ext_stage_cache.c b/src/lib/ext_stage_cache.c index a35ce37..eda653d 100644 --- a/src/lib/ext_stage_cache.c +++ b/src/lib/ext_stage_cache.c @@ -3,8 +3,10 @@ #include <cbmem.h> #include <console/console.h> #include <imd.h> +#include <program_loading.h> #include <stage_cache.h> #include <string.h> +#include <stdint.h>
static struct imd imd_stage_cache;
diff --git a/src/lib/hexdump.c b/src/lib/hexdump.c index 533411f..ae85188 100644 --- a/src/lib/hexdump.c +++ b/src/lib/hexdump.c @@ -1,8 +1,10 @@ /* SPDX-License-Identifier: GPL-2.0-or-later */
+#include <commonlib/bsd/helpers.h> #include <console/console.h> #include <ctype.h> #include <lib.h> +#include <types.h>
void hexdump(const void *memory, size_t length) { diff --git a/src/lib/hexstrtobin.c b/src/lib/hexstrtobin.c index 58dea8e..6b2d8b0 100644 --- a/src/lib/hexstrtobin.c +++ b/src/lib/hexstrtobin.c @@ -2,6 +2,7 @@
#include <ctype.h> #include <lib.h> +#include <types.h>
size_t hexstrtobin(const char *str, uint8_t *buf, size_t len) { diff --git a/src/lib/malloc.c b/src/lib/malloc.c index 57a72c2..398728e 100644 --- a/src/lib/malloc.c +++ b/src/lib/malloc.c @@ -1,6 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <commonlib/bsd/helpers.h> #include <console/console.h> +#include <stdint.h> #include <stdlib.h> #include <string.h>
diff --git a/src/lib/master_header_pointer.c b/src/lib/master_header_pointer.c index b2c3fe6..1d207d3 100644 --- a/src/lib/master_header_pointer.c +++ b/src/lib/master_header_pointer.c @@ -1,6 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <commonlib/bsd/cbfs_serialized.h> +#include <commonlib/bsd/helpers.h> #include <endian.h> #include <fmap_config.h> #include <stdint.h> diff --git a/src/lib/prog_loaders.c b/src/lib/prog_loaders.c index 08ba66a..f948266 100644 --- a/src/lib/prog_loaders.c +++ b/src/lib/prog_loaders.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <bootmem.h> #include <cbfs.h> #include <cbmem.h> #include <console/console.h> @@ -13,6 +14,7 @@ #include <stage_cache.h> #include <symbols.h> #include <timestamp.h> +#include <types.h>
void run_romstage(void) { diff --git a/src/lib/stack.c b/src/lib/stack.c index 479ed93..47e64a6 100644 --- a/src/lib/stack.c +++ b/src/lib/stack.c @@ -23,8 +23,9 @@ */
#include <assert.h> -#include <lib.h> #include <console/console.h> +#include <lib.h> +#include <stddef.h> #include <symbols.h>
int checkstack(void *top_of_stack, int core) diff --git a/src/lib/timestamp.c b/src/lib/timestamp.c index c7e1c0c..063b4ec 100644 --- a/src/lib/timestamp.c +++ b/src/lib/timestamp.c @@ -1,13 +1,15 @@ /* SPDX-License-Identifier: GPL-2.0-only */
#include <assert.h> -#include <stdint.h> -#include <console/console.h> #include <cbmem.h> +#include <commonlib/bsd/helpers.h> +#include <console/console.h> +#include <smp/node.h> +#include <stddef.h> +#include <stdint.h> #include <symbols.h> #include <timer.h> #include <timestamp.h> -#include <smp/node.h>
#define MAX_TIMESTAMPS 192
diff --git a/src/lib/uuid.c b/src/lib/uuid.c index 9d91e6b..0f68f0d 100644 --- a/src/lib/uuid.c +++ b/src/lib/uuid.c @@ -1,7 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <stdint.h> #include <lib.h> +#include <stdint.h> +#include <string.h> #include <uuid.h>
int parse_uuid(uint8_t *const uuid, const char *const uuid_str) diff --git a/src/lib/version.c b/src/lib/version.c index 8471832..cc62903 100644 --- a/src/lib/version.c +++ b/src/lib/version.c @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */
-#include <version.h> #include <build.h> +#include <version.h>
#ifndef CONFIG_MAINBOARD_VENDOR #error CONFIG_MAINBOARD_VENDOR not defined