summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaximilian Brune <maximilian.brune@9elements.com>2023-09-16 19:56:45 +0200
committerJakub Czapiga <czapiga@google.com>2024-02-24 11:49:46 +0000
commita99b580c75278d306d2d1eb0b6893e83388ec513 (patch)
treefe7c54d9195782454984f4d9a9165c658a0f07aa /src
parent366ceeef0f07d3962ee6e6a0f3151a7f438c97ed (diff)
downloadcoreboot-a99b580c75278d306d2d1eb0b6893e83388ec513.tar.gz
coreboot-a99b580c75278d306d2d1eb0b6893e83388ec513.tar.bz2
coreboot-a99b580c75278d306d2d1eb0b6893e83388ec513.zip
treewide: Move list.h to commonlib
It is needed in order to move device_tree.c into commonlib in a subsequent commit. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: I16eb7b743fb1d36301f0eda563a62364e7a9cfec Reviewed-on: https://review.coreboot.org/c/coreboot/+/77968 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/commonlib/Makefile.mk2
-rw-r--r--src/commonlib/include/commonlib/list.h (renamed from src/include/list.h)8
-rw-r--r--src/commonlib/list.c (renamed from src/lib/list.c)2
-rw-r--r--src/include/device_tree.h2
-rw-r--r--src/include/fit.h6
-rw-r--r--src/lib/Makefile.mk2
-rw-r--r--src/lib/cbfs.c2
-rw-r--r--src/lib/edid_fill_fb.c2
8 files changed, 14 insertions, 12 deletions
diff --git a/src/commonlib/Makefile.mk b/src/commonlib/Makefile.mk
index 7ec4de91c013..30aaddf2cca3 100644
--- a/src/commonlib/Makefile.mk
+++ b/src/commonlib/Makefile.mk
@@ -53,6 +53,8 @@ romstage-y += bsd/lz4_wrapper.c
ramstage-y += bsd/lz4_wrapper.c
postcar-y += bsd/lz4_wrapper.c
+all-y += list.c
+
ramstage-y += sort.c
romstage-y += bsd/elog.c
diff --git a/src/include/list.h b/src/commonlib/include/commonlib/list.h
index bfd92a747b96..6c8a5d2cbbea 100644
--- a/src/include/list.h
+++ b/src/commonlib/include/commonlib/list.h
@@ -1,8 +1,10 @@
/* Taken from depthcharge: src/base/list.h */
/* SPDX-License-Identifier: GPL-2.0-or-later */
-#ifndef __LIST_H__
-#define __LIST_H__
+#ifndef __COMMONLIB_LIST_H__
+#define __COMMONLIB_LIST_H__
+
+#include <commonlib/helpers.h>
struct list_node {
struct list_node *next;
@@ -24,4 +26,4 @@ void list_append(struct list_node *node, struct list_node *head);
(ptr) = container_of((ptr)->member.next, \
typeof(*(ptr)), member))
-#endif /* __LIST_H__ */
+#endif /* __COMMONLIB_LIST_H__ */
diff --git a/src/lib/list.c b/src/commonlib/list.c
index c3f8ee42c86e..b1030c826377 100644
--- a/src/lib/list.c
+++ b/src/commonlib/list.c
@@ -1,7 +1,7 @@
/* Taken from depthcharge: src/base/list.c */
/* SPDX-License-Identifier: GPL-2.0-or-later */
-#include <list.h>
+#include <commonlib/list.h>
void list_remove(struct list_node *node)
{
diff --git a/src/include/device_tree.h b/src/include/device_tree.h
index 02fcaa7234c3..e7b79e1a94f1 100644
--- a/src/include/device_tree.h
+++ b/src/include/device_tree.h
@@ -6,7 +6,7 @@
#include <stddef.h>
#include <stdint.h>
-#include <list.h>
+#include <commonlib/list.h>
/*
* Flattened device tree structures/constants.
diff --git a/src/include/fit.h b/src/include/fit.h
index a1e970d502d0..d58775074332 100644
--- a/src/include/fit.h
+++ b/src/include/fit.h
@@ -4,11 +4,11 @@
#ifndef __LIB_FIT_H__
#define __LIB_FIT_H__
-#include <stddef.h>
-#include <stdint.h>
+#include <commonlib/list.h>
#include <device_tree.h>
-#include <list.h>
#include <program_loading.h>
+#include <stddef.h>
+#include <stdint.h>
struct fit_image_node {
const char *name;
diff --git a/src/lib/Makefile.mk b/src/lib/Makefile.mk
index 2a95be9d10ba..fe24156dad1b 100644
--- a/src/lib/Makefile.mk
+++ b/src/lib/Makefile.mk
@@ -28,8 +28,6 @@ CFLAGS_ramstage += $(CFLAGS_asan)
$(obj)/ramstage/lib/asan.o: CFLAGS_asan =
endif
-all-y += list.c
-
decompressor-y += decompressor.c
$(call src-to-obj,decompressor,$(dir)/decompressor.c): $(objcbfs)/bootblock.lz4
$(call src-to-obj,decompressor,$(dir)/decompressor.c): CCACHE_EXTRAFILES=$(objcbfs)/bootblock.lz4
diff --git a/src/lib/cbfs.c b/src/lib/cbfs.c
index 92a00e44186e..03624bf2d7bd 100644
--- a/src/lib/cbfs.c
+++ b/src/lib/cbfs.c
@@ -6,10 +6,10 @@
#include <cbmem.h>
#include <commonlib/bsd/cbfs_private.h>
#include <commonlib/bsd/compression.h>
+#include <commonlib/list.h>
#include <console/console.h>
#include <fmap.h>
#include <lib.h>
-#include <list.h>
#include <metadata_hash.h>
#include <security/tpm/tspi/crtm.h>
#include <security/vboot/vboot_common.h>
diff --git a/src/lib/edid_fill_fb.c b/src/lib/edid_fill_fb.c
index 1df37e80726b..e4fb08c3fdac 100644
--- a/src/lib/edid_fill_fb.c
+++ b/src/lib/edid_fill_fb.c
@@ -6,7 +6,7 @@
#include <framebuffer_info.h>
#include <string.h>
#include <stdlib.h>
-#include <list.h>
+#include <commonlib/list.h>
struct fb_info {
struct list_node node;