From 0f90b1e715f8abe41b0875752eb184f46032ff11 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Mon, 9 Feb 2026 09:30:18 +0800 Subject: treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and drop the unnecessary inclusion of asm/global_data.h. Headers should be included directly by the files that need them, rather than indirectly via global_data.h. Reviewed-by: Patrice Chotard #STMicroelectronics boards and STM32MP1 ram test driver Tested-by: Anshul Dalal #TI boards Acked-by: Yao Zi #TH1520 Signed-off-by: Peng Fan --- boot/bootmeth-uclass.c | 2 -- boot/fdt_simplefb.c | 3 --- boot/image-sig.c | 2 -- boot/image.c | 3 --- 4 files changed, 10 deletions(-) (limited to 'boot') diff --git a/boot/bootmeth-uclass.c b/boot/bootmeth-uclass.c index a9709465f6e..c841dd0d6d4 100644 --- a/boot/bootmeth-uclass.c +++ b/boot/bootmeth-uclass.c @@ -19,8 +19,6 @@ #include #include -DECLARE_GLOBAL_DATA_PTR; - int bootmeth_get_state_desc(struct udevice *dev, char *buf, int maxsize) { const struct bootmeth_ops *ops = bootmeth_get_ops(dev); diff --git a/boot/fdt_simplefb.c b/boot/fdt_simplefb.c index 5822131767d..69c7c2e24c0 100644 --- a/boot/fdt_simplefb.c +++ b/boot/fdt_simplefb.c @@ -8,14 +8,11 @@ #include #include -#include #include #include #include #include -DECLARE_GLOBAL_DATA_PTR; - static int fdt_simplefb_configure_node(void *blob, int off) { int xsize, ysize; diff --git a/boot/image-sig.c b/boot/image-sig.c index 6bc74866eae..4eab017bc2d 100644 --- a/boot/image-sig.c +++ b/boot/image-sig.c @@ -5,8 +5,6 @@ #include #include -#include -DECLARE_GLOBAL_DATA_PTR; #include #include #include diff --git a/boot/image.c b/boot/image.c index dd96f712b6f..3f745254763 100644 --- a/boot/image.c +++ b/boot/image.c @@ -24,12 +24,9 @@ #include #endif -#include #include #include -DECLARE_GLOBAL_DATA_PTR; - /* Set this if we have less than 4 MB of malloc() space */ #if CONFIG_SYS_MALLOC_LEN < (4096 * 1024) #define CONSERVE_MEMORY true -- cgit v1.2.3