From 60e313d5c6373df88b99dc3be6f4ead04e9b3360 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 14 May 2025 12:15:31 -0600 Subject: [PATCH 01/27] global: Add instead of long indirect include path In a number of cases we have C files which rely on a chain of indirect include paths to get to be included via . To facilitate cleaning up make this code directly include . Signed-off-by: Tom Rini --- Cc: Andrew Davis Cc: Bin Meng Cc: Dai Okamura Cc: Fabio Estevam Cc: Francesco Dolcini Cc: Ilias Apalodimas Cc: Jens Wiklander Cc: Kunihiko Hayashi Cc: Mingkai Hu Cc: Priyanka Jain Cc: Shengzhou Liu Cc: Simon Glass Cc: Stefano Babic Cc: Svyatoslav Ryhel Cc: Thierry Reding Cc: William Zhang --- arch/arm/mach-imx/mx5/clock.c | 1 + arch/arm/mach-keystone/cmd_clock.c | 1 + arch/arm/mach-tegra/tegra124/bct.c | 1 + arch/arm/mach-tegra/tegra20/bct.c | 1 + arch/arm/mach-tegra/tegra30/bct.c | 1 + arch/arm/mach-uniphier/dram/cmd_ddrmphy.c | 1 + arch/arm/mach-uniphier/dram/cmd_ddrphy.c | 1 + board/freescale/common/qixis.c | 1 + board/freescale/ls1043ardb/cpld.c | 1 + board/freescale/ls1046ardb/cpld.c | 1 + board/freescale/p2041rdb/cpld.c | 1 + board/freescale/t102xrdb/cpld.c | 1 + board/freescale/t104xrdb/cpld.c | 1 + board/freescale/t208xrdb/cpld.c | 1 + board/freescale/t4rdb/cpld.c | 1 + board/toradex/apalis_imx6/do_fuse.c | 1 + board/toradex/colibri_imx6/do_fuse.c | 1 + boot/image-pre-load.c | 1 + cmd/2048.c | 1 + cmd/armflash.c | 1 + cmd/bootstage.c | 1 + cmd/cache.c | 1 + cmd/diag.c | 1 + cmd/dm.c | 1 + cmd/echo.c | 1 + cmd/flash.c | 1 + cmd/fuse.c | 1 + cmd/irq.c | 1 + cmd/legacy_led.c | 1 + cmd/mp.c | 1 + cmd/optee.c | 1 + cmd/sha1sum.c | 1 + cmd/sleep.c | 1 + cmd/smccc.c | 1 + cmd/stackprot_test.c | 1 + cmd/strings.c | 1 + cmd/test.c | 1 + cmd/timer.c | 1 + cmd/ufs.c | 1 + cmd/x86/mtrr.c | 1 + drivers/tpm/sandbox_common.c | 1 + 41 files changed, 41 insertions(+) diff --git a/arch/arm/mach-imx/mx5/clock.c b/arch/arm/mach-imx/mx5/clock.c index 41116e2c6a2..9901f8a7b56 100644 --- a/arch/arm/mach-imx/mx5/clock.c +++ b/arch/arm/mach-imx/mx5/clock.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-keystone/cmd_clock.c b/arch/arm/mach-keystone/cmd_clock.c index e9ecc05953a..7b94a80b725 100644 --- a/arch/arm/mach-keystone/cmd_clock.c +++ b/arch/arm/mach-keystone/cmd_clock.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-tegra/tegra124/bct.c b/arch/arm/mach-tegra/tegra124/bct.c index a71aa87fce1..4dc4b7138ab 100644 --- a/arch/arm/mach-tegra/tegra124/bct.c +++ b/arch/arm/mach-tegra/tegra124/bct.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "bct.h" #include "uboot_aes.h" diff --git a/arch/arm/mach-tegra/tegra20/bct.c b/arch/arm/mach-tegra/tegra20/bct.c index b647b6b26d2..253cb243676 100644 --- a/arch/arm/mach-tegra/tegra20/bct.c +++ b/arch/arm/mach-tegra/tegra20/bct.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "bct.h" #include "uboot_aes.h" diff --git a/arch/arm/mach-tegra/tegra30/bct.c b/arch/arm/mach-tegra/tegra30/bct.c index 250009ea8d8..398ba1de386 100644 --- a/arch/arm/mach-tegra/tegra30/bct.c +++ b/arch/arm/mach-tegra/tegra30/bct.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include "bct.h" #include "uboot_aes.h" diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c index 629f8b90c9d..be4ce3265bb 100644 --- a/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c +++ b/arch/arm/mach-uniphier/dram/cmd_ddrmphy.c @@ -9,6 +9,7 @@ #include #include #include +#include #include "../soc-info.h" #include "ddrmphy-regs.h" diff --git a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c index ca519d1c7e0..3ccafe20638 100644 --- a/arch/arm/mach-uniphier/dram/cmd_ddrphy.c +++ b/arch/arm/mach-uniphier/dram/cmd_ddrphy.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "../soc-info.h" #include "ddrphy-regs.h" diff --git a/board/freescale/common/qixis.c b/board/freescale/common/qixis.c index 7815ba2dbce..04cad48f033 100644 --- a/board/freescale/common/qixis.c +++ b/board/freescale/common/qixis.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include "qixis.h" diff --git a/board/freescale/ls1043ardb/cpld.c b/board/freescale/ls1043ardb/cpld.c index bda2f3ac3a6..39b6c6449cf 100644 --- a/board/freescale/ls1043ardb/cpld.c +++ b/board/freescale/ls1043ardb/cpld.c @@ -7,6 +7,7 @@ #include #include +#include #include #include "cpld.h" diff --git a/board/freescale/ls1046ardb/cpld.c b/board/freescale/ls1046ardb/cpld.c index 7f8ca2e857f..26a5962bd6e 100644 --- a/board/freescale/ls1046ardb/cpld.c +++ b/board/freescale/ls1046ardb/cpld.c @@ -7,6 +7,7 @@ #include #include +#include #include #include "cpld.h" diff --git a/board/freescale/p2041rdb/cpld.c b/board/freescale/p2041rdb/cpld.c index 915a8b994d5..2bba377d4d4 100644 --- a/board/freescale/p2041rdb/cpld.c +++ b/board/freescale/p2041rdb/cpld.c @@ -12,6 +12,7 @@ */ #include +#include #include #include "cpld.h" diff --git a/board/freescale/t102xrdb/cpld.c b/board/freescale/t102xrdb/cpld.c index cc933ccd544..00ea9d8f503 100644 --- a/board/freescale/t102xrdb/cpld.c +++ b/board/freescale/t102xrdb/cpld.c @@ -9,6 +9,7 @@ #include #include +#include #include #include "cpld.h" diff --git a/board/freescale/t104xrdb/cpld.c b/board/freescale/t104xrdb/cpld.c index c2d526ae15a..038e40e2fae 100644 --- a/board/freescale/t104xrdb/cpld.c +++ b/board/freescale/t104xrdb/cpld.c @@ -12,6 +12,7 @@ #include #include +#include #include #include "cpld.h" diff --git a/board/freescale/t208xrdb/cpld.c b/board/freescale/t208xrdb/cpld.c index d2226af6278..838d88d977e 100644 --- a/board/freescale/t208xrdb/cpld.c +++ b/board/freescale/t208xrdb/cpld.c @@ -7,6 +7,7 @@ #include #include +#include #include #include "cpld.h" diff --git a/board/freescale/t4rdb/cpld.c b/board/freescale/t4rdb/cpld.c index f076350c1c5..258581eee96 100644 --- a/board/freescale/t4rdb/cpld.c +++ b/board/freescale/t4rdb/cpld.c @@ -16,6 +16,7 @@ #include #include +#include #include #include "cpld.h" diff --git a/board/toradex/apalis_imx6/do_fuse.c b/board/toradex/apalis_imx6/do_fuse.c index 698b05bc5ad..8721276bed8 100644 --- a/board/toradex/apalis_imx6/do_fuse.c +++ b/board/toradex/apalis_imx6/do_fuse.c @@ -11,6 +11,7 @@ #include #include #include +#include static int mfgr_fuse(void) { diff --git a/board/toradex/colibri_imx6/do_fuse.c b/board/toradex/colibri_imx6/do_fuse.c index 698b05bc5ad..8721276bed8 100644 --- a/board/toradex/colibri_imx6/do_fuse.c +++ b/board/toradex/colibri_imx6/do_fuse.c @@ -11,6 +11,7 @@ #include #include #include +#include static int mfgr_fuse(void) { diff --git a/boot/image-pre-load.c b/boot/image-pre-load.c index adf3b341a20..2f851ebb28c 100644 --- a/boot/image-pre-load.c +++ b/boot/image-pre-load.c @@ -7,6 +7,7 @@ #include "mkimage.h" #else #include +#include #include DECLARE_GLOBAL_DATA_PTR; #endif /* !USE_HOSTCC*/ diff --git a/cmd/2048.c b/cmd/2048.c index 42cd171b0e4..aa0f82721dc 100644 --- a/cmd/2048.c +++ b/cmd/2048.c @@ -8,6 +8,7 @@ #include #include #include +#include #define SIZE 4 static uint score; diff --git a/cmd/armflash.c b/cmd/armflash.c index e292cf85c45..83f616db4ef 100644 --- a/cmd/armflash.c +++ b/cmd/armflash.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #define MAX_REGIONS 4 diff --git a/cmd/bootstage.c b/cmd/bootstage.c index 8248c41ca82..5c6d5a3ab45 100644 --- a/cmd/bootstage.c +++ b/cmd/bootstage.c @@ -6,6 +6,7 @@ #include #include #include +#include static int do_bootstage_report(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/cache.c b/cmd/cache.c index 3049f5c305f..b7007877ab0 100644 --- a/cmd/cache.c +++ b/cmd/cache.c @@ -10,6 +10,7 @@ #include #include #include +#include static int parse_argv(const char *); diff --git a/cmd/diag.c b/cmd/diag.c index c6da5aae3fc..4a88ab00a07 100644 --- a/cmd/diag.c +++ b/cmd/diag.c @@ -9,6 +9,7 @@ */ #include #include +#include int do_diag(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/cmd/dm.c b/cmd/dm.c index ec9cfd85376..1f212c0f030 100644 --- a/cmd/dm.c +++ b/cmd/dm.c @@ -9,6 +9,7 @@ #include #include #include +#include static int do_dm_dump_driver_compat(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) diff --git a/cmd/echo.c b/cmd/echo.c index 973213a03a6..d1346504cfb 100644 --- a/cmd/echo.c +++ b/cmd/echo.c @@ -5,6 +5,7 @@ */ #include +#include static int do_echo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/flash.c b/cmd/flash.c index fd660ec477c..76aa387ba59 100644 --- a/cmd/flash.c +++ b/cmd/flash.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #if defined(CONFIG_CMD_MTDPARTS) diff --git a/cmd/fuse.c b/cmd/fuse.c index 6c42c096809..e2206cdf0d5 100644 --- a/cmd/fuse.c +++ b/cmd/fuse.c @@ -14,6 +14,7 @@ #include #include #include +#include static int confirm_prog(void) { diff --git a/cmd/irq.c b/cmd/irq.c index da223b4b2cc..58483d04de8 100644 --- a/cmd/irq.c +++ b/cmd/irq.c @@ -6,6 +6,7 @@ #include #include #include +#include static int do_interrupts(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/legacy_led.c b/cmd/legacy_led.c index 50de7e89d8f..db312ae6e2d 100644 --- a/cmd/legacy_led.c +++ b/cmd/legacy_led.c @@ -12,6 +12,7 @@ #include #include #include +#include struct led_tbl_s { char *string; /* String for use in the command */ diff --git a/cmd/mp.c b/cmd/mp.c index 261bb8a07d4..686e1f8a82f 100644 --- a/cmd/mp.c +++ b/cmd/mp.c @@ -6,6 +6,7 @@ #include #include #include +#include static int cpu_status_all(void) { diff --git a/cmd/optee.c b/cmd/optee.c index e3aae5e9f9b..155c9f1bb73 100644 --- a/cmd/optee.c +++ b/cmd/optee.c @@ -6,6 +6,7 @@ #include #include #include +#include #define TA_HELLO_WORLD_CMD_INC_VALUE 0 /* This needs to match the UUID of the Hello World TA. */ diff --git a/cmd/sha1sum.c b/cmd/sha1sum.c index 52aa26c78d2..f2757146bba 100644 --- a/cmd/sha1sum.c +++ b/cmd/sha1sum.c @@ -9,6 +9,7 @@ #include #include +#include #include int do_sha1sum(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/sleep.c b/cmd/sleep.c index 7616fed7556..a8c896e0c5e 100644 --- a/cmd/sleep.c +++ b/cmd/sleep.c @@ -9,6 +9,7 @@ #include #include #include +#include static int do_sleep(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/smccc.c b/cmd/smccc.c index 3a4d885e37e..fa04bb05ca4 100644 --- a/cmd/smccc.c +++ b/cmd/smccc.c @@ -9,6 +9,7 @@ #include #include #include +#include static int do_call(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/stackprot_test.c b/cmd/stackprot_test.c index e7ff4a06158..78e9beba5bf 100644 --- a/cmd/stackprot_test.c +++ b/cmd/stackprot_test.c @@ -4,6 +4,7 @@ */ #include +#include static int do_test_stackprot_fail(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/strings.c b/cmd/strings.c index 5bcb0f2b567..beac2a6e6b3 100644 --- a/cmd/strings.c +++ b/cmd/strings.c @@ -9,6 +9,7 @@ #include #include #include +#include static char *start_addr, *last_addr; diff --git a/cmd/test.c b/cmd/test.c index b4c3eabf9f6..4774d296487 100644 --- a/cmd/test.c +++ b/cmd/test.c @@ -8,6 +8,7 @@ #include #include #include +#include #define OP_INVALID 0 #define OP_NOT 1 diff --git a/cmd/timer.c b/cmd/timer.c index 04fcd84ac6a..427309e108d 100644 --- a/cmd/timer.c +++ b/cmd/timer.c @@ -6,6 +6,7 @@ #include #include +#include static int do_timer(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/ufs.c b/cmd/ufs.c index 6e21fbb1685..790dab50f18 100644 --- a/cmd/ufs.c +++ b/cmd/ufs.c @@ -8,6 +8,7 @@ #include #include #include +#include static int do_ufs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/cmd/x86/mtrr.c b/cmd/x86/mtrr.c index 289865515ef..91130453039 100644 --- a/cmd/x86/mtrr.c +++ b/cmd/x86/mtrr.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/tpm/sandbox_common.c b/drivers/tpm/sandbox_common.c index 596e0156389..9d386fc32e5 100644 --- a/drivers/tpm/sandbox_common.c +++ b/drivers/tpm/sandbox_common.c @@ -9,6 +9,7 @@ #include #include +#include #include #include "sandbox_common.h" From 2f0bf852abeca1fed98662b4b5f6a655b8d46925 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 14 May 2025 12:21:31 -0600 Subject: [PATCH 02/27] cmd/mem.c, test/cmd/mem_copy.c: Add These files require in order to have MEM_SUPPORT_64BIT_DATA be defined but currently rely on a long indirect include path to get it. Add this directly. Signed-off-by: Tom Rini --- cmd/mem.c | 1 + test/cmd/mem_copy.c | 1 + 2 files changed, 2 insertions(+) diff --git a/cmd/mem.c b/cmd/mem.c index 9e716776393..e5b9cb29349 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_MTD_NOR_FLASH diff --git a/test/cmd/mem_copy.c b/test/cmd/mem_copy.c index 3e904fc4e4b..8e551f18a85 100644 --- a/test/cmd/mem_copy.c +++ b/test/cmd/mem_copy.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include From f97cfef5d9711d567bc86a7bd23a51776568c8d2 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 14 May 2025 12:39:35 -0600 Subject: [PATCH 03/27] gpio: pca953x: Add missing This driver takes a long implicit include path to get this header which it directly uses. Add it. Signed-off-by: Tom Rini --- drivers/gpio/pca953x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 2fb14590c0f..f0a79b92b02 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c @@ -13,6 +13,7 @@ #include #include #include +#include /* Default to an address that hopefully won't corrupt other i2c devices */ #ifndef CFG_SYS_I2C_PCA953X_ADDR From 7894816a98f7d1484fd2be36fc8020250512a6da Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 14 May 2025 13:34:36 -0600 Subject: [PATCH 04/27] global: Avoid indirect inclusion of from The include file does not need anything from . Furthermore, include/env.h itself includes other headers which can lead to longer indirect inclusion paths. To prepare to remove from fix all of the places which had relied on this indirect inclusion to instead include directly. Signed-off-by: Tom Rini --- Cc: Anatolij Gustschin Cc: Bin Meng Cc: Heinrich Schuchardt Cc: Ilias Apalodimas Cc: Jaehoon Chung Cc: Jerome Forissier Cc: Linus Walleij Cc: Lukasz Majewski Cc: Marek Vasut Cc: Mark Kettenis Cc: Masahisa Kojima Cc: Mattijs Korpershoek Cc: Patrice Chotard Cc: Patrick Delaunay Cc: Rayagonda Kokatanur Cc: Simon Glass Cc: Simon Goldschmidt Cc: Stefan Bosch Cc: Tien Fong Chee Cc: Tingting Meng Cc: Tobias Waldekranz --- arch/arm/cpu/armv8/fsl-layerscape/fdt.c | 1 + arch/arm/mach-apple/board.c | 1 + arch/arm/mach-k3/r5/common.c | 1 + arch/arm/mach-socfpga/board.c | 1 + arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c | 1 + board/liebherr/mccmon6/spl.c | 1 + board/siemens/common/board_am335x.c | 1 + board/socionext/developerbox/fwu_plat.c | 1 + boot/bootmeth_android.c | 1 + cmd/abootimg.c | 1 + cmd/adc.c | 1 + cmd/armflash.c | 1 + cmd/bcb.c | 1 + cmd/blkmap.c | 1 + cmd/bootflow.c | 1 + cmd/booti.c | 1 + cmd/bootmeth.c | 1 + cmd/broadcom/nitro_image_load.c | 1 + cmd/extension_board.c | 1 + cmd/hash.c | 1 + cmd/mbr.c | 1 + cmd/mem.c | 1 + cmd/mmc.c | 1 + cmd/sandbox/exception.c | 1 + cmd/seama.c | 1 + cmd/spawn.c | 1 + cmd/upl.c | 1 + cmd/x86/zboot.c | 1 + common/usb.c | 1 + drivers/power/axp221.c | 1 + drivers/video/nexell_display.c | 1 + lib/efi_loader/efi_firmware.c | 1 + test/boot/bootdev.c | 1 + test/boot/bootflow.c | 1 + test/boot/bootm.c | 1 + test/boot/bootmeth.c | 1 + test/boot/measurement.c | 1 + test/boot/upl.c | 1 + test/cmd/fdt.c | 1 + test/cmd/hash.c | 1 + test/cmd/mem_search.c | 1 + test/cmd/setexpr.c | 1 + test/common/test_autoboot.c | 1 + test/dm/blkmap.c | 1 + test/dm/button.c | 1 + test/dm/fastboot.c | 1 + test/dm/part.c | 1 + test/env/fdt.c | 1 + test/hush/dollar.c | 1 + test/hush/if.c | 1 + test/hush/loop.c | 1 + 51 files changed, 51 insertions(+) diff --git a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c index ca6be3626fb..e8d2339f1a3 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/fdt.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/fdt.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/arch/arm/mach-apple/board.c b/arch/arm/mach-apple/board.c index 2644a04a622..2604c5a710e 100644 --- a/arch/arm/mach-apple/board.c +++ b/arch/arm/mach-apple/board.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include diff --git a/arch/arm/mach-k3/r5/common.c b/arch/arm/mach-k3/r5/common.c index 0b6604039f3..fa146549f13 100644 --- a/arch/arm/mach-k3/r5/common.c +++ b/arch/arm/mach-k3/r5/common.c @@ -5,6 +5,7 @@ * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/ */ +#include #include #include #include diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c index 8506d510413..bda12324803 100644 --- a/arch/arm/mach-socfpga/board.c +++ b/arch/arm/mach-socfpga/board.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c index 04640e476e6..506ecac2ef0 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/board/liebherr/mccmon6/spl.c b/board/liebherr/mccmon6/spl.c index b1f6881275d..e612d9e9ce0 100644 --- a/board/liebherr/mccmon6/spl.c +++ b/board/liebherr/mccmon6/spl.c @@ -5,6 +5,7 @@ * Richard Hu */ +#include #include #include #include diff --git a/board/siemens/common/board_am335x.c b/board/siemens/common/board_am335x.c index daf0bb930ec..939ff81797d 100644 --- a/board/siemens/common/board_am335x.c +++ b/board/siemens/common/board_am335x.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/socionext/developerbox/fwu_plat.c b/board/socionext/developerbox/fwu_plat.c index a8b111477ef..5d2f40f241c 100644 --- a/board/socionext/developerbox/fwu_plat.c +++ b/board/socionext/developerbox/fwu_plat.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/boot/bootmeth_android.c b/boot/bootmeth_android.c index 654ebfdf1fc..8c2bde10e17 100644 --- a/boot/bootmeth_android.c +++ b/boot/bootmeth_android.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/abootimg.c b/cmd/abootimg.c index ae7a1a7c83b..44de00fb9c9 100644 --- a/cmd/abootimg.c +++ b/cmd/abootimg.c @@ -6,6 +6,7 @@ #include #include +#include #include #include diff --git a/cmd/adc.c b/cmd/adc.c index 4d3b5b61f6f..334ba7fdeca 100644 --- a/cmd/adc.c +++ b/cmd/adc.c @@ -5,6 +5,7 @@ */ #include #include +#include #include #include diff --git a/cmd/armflash.c b/cmd/armflash.c index 83f616db4ef..cde275c881b 100644 --- a/cmd/armflash.c +++ b/cmd/armflash.c @@ -7,6 +7,7 @@ */ #include #include +#include #include #include #include diff --git a/cmd/bcb.c b/cmd/bcb.c index 16eabfe00f5..d6d944bd6b3 100644 --- a/cmd/bcb.c +++ b/cmd/bcb.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/blkmap.c b/cmd/blkmap.c index 86a123b1cd3..65edec899e2 100644 --- a/cmd/blkmap.c +++ b/cmd/blkmap.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include diff --git a/cmd/bootflow.c b/cmd/bootflow.c index a1fd59a69f4..d4f7d336150 100644 --- a/cmd/bootflow.c +++ b/cmd/bootflow.c @@ -13,6 +13,7 @@ #include #include #include +#include #include /** diff --git a/cmd/booti.c b/cmd/booti.c index 1a57fe91397..7e6d9426299 100644 --- a/cmd/booti.c +++ b/cmd/booti.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/cmd/bootmeth.c b/cmd/bootmeth.c index 2f41fa1bec6..ea4b3f47db8 100644 --- a/cmd/bootmeth.c +++ b/cmd/bootmeth.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include diff --git a/cmd/broadcom/nitro_image_load.c b/cmd/broadcom/nitro_image_load.c index 289b184e9af..fe08679840e 100644 --- a/cmd/broadcom/nitro_image_load.c +++ b/cmd/broadcom/nitro_image_load.c @@ -4,6 +4,7 @@ */ #include +#include #include #define FW_IMAGE_SIG 0xff123456 diff --git a/cmd/extension_board.c b/cmd/extension_board.c index 6c14d0ddebd..317b260bf36 100644 --- a/cmd/extension_board.c +++ b/cmd/extension_board.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/hash.c b/cmd/hash.c index 5b40982b098..96d0e443a5b 100644 --- a/cmd/hash.c +++ b/cmd/hash.c @@ -10,6 +10,7 @@ */ #include +#include #include #include diff --git a/cmd/mbr.c b/cmd/mbr.c index 7e1f92a13bb..7fe6c9e103a 100644 --- a/cmd/mbr.c +++ b/cmd/mbr.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include diff --git a/cmd/mem.c b/cmd/mem.c index e5b9cb29349..b8afe62e474 100644 --- a/cmd/mem.c +++ b/cmd/mem.c @@ -17,6 +17,7 @@ #include #include #include +#include #ifdef CONFIG_MTD_NOR_FLASH #include #endif diff --git a/cmd/mmc.c b/cmd/mmc.c index fe7899ec793..5340a58be8e 100644 --- a/cmd/mmc.c +++ b/cmd/mmc.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/sandbox/exception.c b/cmd/sandbox/exception.c index f9c847d8ff2..e015acf60e2 100644 --- a/cmd/sandbox/exception.c +++ b/cmd/sandbox/exception.c @@ -6,6 +6,7 @@ */ #include +#include static int do_sigsegv(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/cmd/seama.c b/cmd/seama.c index 3c8e8199234..d6287978090 100644 --- a/cmd/seama.c +++ b/cmd/seama.c @@ -5,6 +5,7 @@ */ #include +#include #include /* diff --git a/cmd/spawn.c b/cmd/spawn.c index 37737b8627c..8829aa9728d 100644 --- a/cmd/spawn.c +++ b/cmd/spawn.c @@ -5,6 +5,7 @@ #include #include +#include #include #include #include diff --git a/cmd/upl.c b/cmd/upl.c index c9a823bbc06..ef2183d8528 100644 --- a/cmd/upl.c +++ b/cmd/upl.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c index 94e602b8a5b..3876d163236 100644 --- a/cmd/x86/zboot.c +++ b/cmd/x86/zboot.c @@ -8,6 +8,7 @@ #define LOG_CATEGORY LOGC_BOOT #include +#include #include #include #include diff --git a/common/usb.c b/common/usb.c index 7a8435296c6..6a4ad346f4b 100644 --- a/common/usb.c +++ b/common/usb.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/power/axp221.c b/drivers/power/axp221.c index c22ca03f469..f5daa243082 100644 --- a/drivers/power/axp221.c +++ b/drivers/power/axp221.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/drivers/video/nexell_display.c b/drivers/video/nexell_display.c index 7bda33fb16e..ea3776258a0 100644 --- a/drivers/video/nexell_display.c +++ b/drivers/video/nexell_display.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/efi_loader/efi_firmware.c b/lib/efi_loader/efi_firmware.c index d44dc09813e..75501e21557 100644 --- a/lib/efi_loader/efi_firmware.c +++ b/lib/efi_loader/efi_firmware.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c index 9af94786870..a5f3d4462a9 100644 --- a/test/boot/bootdev.c +++ b/test/boot/bootdev.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index b261bd5f620..a930d2cc309 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #ifdef CONFIG_SANDBOX diff --git a/test/boot/bootm.c b/test/boot/bootm.c index 1d1efe71ad5..ed60094f3c1 100644 --- a/test/boot/bootm.c +++ b/test/boot/bootm.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/test/boot/bootmeth.c b/test/boot/bootmeth.c index 577f259fb37..2ef3569ad83 100644 --- a/test/boot/bootmeth.c +++ b/test/boot/bootmeth.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include "bootstd_common.h" diff --git a/test/boot/measurement.c b/test/boot/measurement.c index 1d38663fc0f..71f503f1567 100644 --- a/test/boot/measurement.c +++ b/test/boot/measurement.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/test/boot/upl.c b/test/boot/upl.c index eec89026fc3..e2dc3d51eda 100644 --- a/test/boot/upl.c +++ b/test/boot/upl.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c index c11c181c807..96a8488e172 100644 --- a/test/cmd/fdt.c +++ b/test/cmd/fdt.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/test/cmd/hash.c b/test/cmd/hash.c index 296dd762b31..bb96380c351 100644 --- a/test/cmd/hash.c +++ b/test/cmd/hash.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/test/cmd/mem_search.c b/test/cmd/mem_search.c index df8938bdb6c..61de0dfb9a9 100644 --- a/test/cmd/mem_search.c +++ b/test/cmd/mem_search.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/test/cmd/setexpr.c b/test/cmd/setexpr.c index 85803eb54b8..93b0c4b68f5 100644 --- a/test/cmd/setexpr.c +++ b/test/cmd/setexpr.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/test/common/test_autoboot.c b/test/common/test_autoboot.c index e3050d02c60..5feff57c271 100644 --- a/test/common/test_autoboot.c +++ b/test/common/test_autoboot.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/test/dm/blkmap.c b/test/dm/blkmap.c index a6a0b4d4e20..d04b68b50ae 100644 --- a/test/dm/blkmap.c +++ b/test/dm/blkmap.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/test/dm/button.c b/test/dm/button.c index 3612f308f02..f05f4ca27ce 100644 --- a/test/dm/button.c +++ b/test/dm/button.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/test/dm/fastboot.c b/test/dm/fastboot.c index 73c43f82924..5b51b6bf9dd 100644 --- a/test/dm/fastboot.c +++ b/test/dm/fastboot.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/test/dm/part.c b/test/dm/part.c index c5c4b3fdba1..caae23bd4aa 100644 --- a/test/dm/part.c +++ b/test/dm/part.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/test/env/fdt.c b/test/env/fdt.c index c495ac7b307..3652563f330 100644 --- a/test/env/fdt.c +++ b/test/env/fdt.c @@ -1,4 +1,5 @@ #include +#include #include #include #include diff --git a/test/hush/dollar.c b/test/hush/dollar.c index 820110799a2..b83a64d091d 100644 --- a/test/hush/dollar.c +++ b/test/hush/dollar.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/test/hush/if.c b/test/hush/if.c index 8939b7a6c86..ea615b246a9 100644 --- a/test/hush/if.c +++ b/test/hush/if.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/test/hush/loop.c b/test/hush/loop.c index 7154b9bc0ae..ea72ac773ba 100644 --- a/test/hush/loop.c +++ b/test/hush/loop.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include From 5b82721337e271609419dce490884392085d8d1f Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 14 May 2025 13:38:54 -0600 Subject: [PATCH 05/27] include/command.h: Drop Now that all of the cases of code that relied on to provide (or one of the headers that it includes, and so forth) have been fixed, we can drop the include from here. Signed-off-by: Tom Rini --- include/command.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/command.h b/include/command.h index 4158ca11b0e..5d225cd197f 100644 --- a/include/command.h +++ b/include/command.h @@ -10,7 +10,6 @@ #ifndef __COMMAND_H #define __COMMAND_H -#include #include #include From 05f6f6e8c76c68a36125ec7a6af911ee9418bc99 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 15 May 2025 17:31:30 -0600 Subject: [PATCH 06/27] net: Remove env_get_ip helper() function Currently, we have the function env_get_ip which takes an IP address in string form and returns a struct in_addr representation of that address. It is however little used and means that a number of places indirectly (and unclearly) get via . To clean this up start by replacing env_get_ip() calls with string_to_ip() calls. This is generally a no-op as env_get_ip(str) is an inline of string_to_ip(env_get(str)) but in a few cases we can or already have stored the result of env_get(str) and can save the additional call. Signed-off-by: Tom Rini --- cmd/elf.c | 2 +- cmd/net.c | 2 +- drivers/net/netconsole.c | 11 ++++++----- include/net-common.h | 13 ------------- net/link_local.c | 2 +- 5 files changed, 9 insertions(+), 21 deletions(-) diff --git a/cmd/elf.c b/cmd/elf.c index 6b49c613703..5e0ee30a7c8 100644 --- a/cmd/elf.c +++ b/cmd/elf.c @@ -247,7 +247,7 @@ int do_bootvx(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) ptr += sprintf(build_buf + ptr, "e=%s", tmp); tmp = env_get("netmask"); if (tmp) { - u32 mask = env_get_ip("netmask").s_addr; + u32 mask = string_to_ip(tmp).s_addr; ptr += sprintf(build_buf + ptr, ":%08x ", ntohl(mask)); } else { diff --git a/cmd/net.c b/cmd/net.c index eaa1de5295f..886735ea14f 100644 --- a/cmd/net.c +++ b/cmd/net.c @@ -564,7 +564,7 @@ int do_sntp(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) char *toff; if (argc < 2) { - net_ntp_server = env_get_ip("ntpserverip"); + net_ntp_server = string_to_ip(env_get("ntpserverip")); if (net_ntp_server.s_addr == 0) { printf("ntpserverip not set\n"); return CMD_RET_FAILURE; diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c index 1943de8ba73..c2ce4a80d12 100644 --- a/drivers/net/netconsole.c +++ b/drivers/net/netconsole.c @@ -61,8 +61,8 @@ static int is_broadcast(struct in_addr ip) /* update only when the environment has changed */ if (env_changed_id != env_id) { - netmask = env_get_ip("netmask"); - our_ip = env_get_ip("ipaddr"); + netmask = string_to_ip(env_get("netmask")); + our_ip = string_to_ip(env_get("ipaddr")); env_changed_id = env_id; } @@ -81,11 +81,12 @@ static int refresh_settings_from_env(void) /* update only when the environment has changed */ if (env_changed_id != env_id) { - if (env_get("ncip")) { - nc_ip = env_get_ip("ncip"); + char *tmp = env_get("ncip"); + if (tmp) { + nc_ip = string_to_ip(tmp); if (!nc_ip.s_addr) return -1; /* ncip is 0.0.0.0 */ - p = strchr(env_get("ncip"), ':'); + p = strchr(tmp, ':'); if (p != NULL) { nc_out_port = dectoul(p + 1, NULL); nc_in_port = nc_out_port; diff --git a/include/net-common.h b/include/net-common.h index e536968a92b..2ca565fe4ed 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -456,19 +456,6 @@ void net_process_received_packet(uchar *in_packet, int len); */ int update_tftp(ulong addr, char *interface, char *devstring); -/** - * env_get_ip() - Convert an environment value to an ip address - * - * @var: Environment variable to convert. The value of this variable must be - * in the format a.b.c.d, where each value is a decimal number from - * 0 to 255 - * Return: IP address, or 0 if invalid - */ -static inline struct in_addr env_get_ip(char *var) -{ - return string_to_ip(env_get(var)); -} - int net_init(void); /* Called when a network operation fails to know if it should be re-tried */ diff --git a/net/link_local.c b/net/link_local.c index 179721333ff..f6425ff3df2 100644 --- a/net/link_local.c +++ b/net/link_local.c @@ -106,7 +106,7 @@ static void configure_wait(void) void link_local_start(void) { - ip = env_get_ip("llipaddr"); + ip = string_to_ip(env_get("llipaddr")); if (ip.s_addr != 0 && (ntohl(ip.s_addr) & IN_CLASSB_NET) != LINKLOCAL_ADDR) { puts("invalid link address"); From 67a7633e04d71c61018d857f27d18e05acc5b844 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:31 -0600 Subject: [PATCH 07/27] congatec: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass Signed-off-by: Tom Rini --- board/congatec/cgtqmx8/cgtqmx8.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/congatec/cgtqmx8/cgtqmx8.c b/board/congatec/cgtqmx8/cgtqmx8.c index 054e4e10867..03be02a2884 100644 --- a/board/congatec/cgtqmx8/cgtqmx8.c +++ b/board/congatec/cgtqmx8/cgtqmx8.c @@ -4,6 +4,7 @@ * Copyright (C) 2019 Oliver Graute */ #include +#include #include #include #include From 09c9957e8808b6a3513450c802d43c9410a14368 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:32 -0600 Subject: [PATCH 08/27] dhelectronics: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass --- board/dhelectronics/common/dh_common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/dhelectronics/common/dh_common.c b/board/dhelectronics/common/dh_common.c index 71010803f55..8c052c45007 100644 --- a/board/dhelectronics/common/dh_common.c +++ b/board/dhelectronics/common/dh_common.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include From 84a1c99055166857efabe55277f01341404e8dda Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:33 -0600 Subject: [PATCH 09/27] imx8ulp_evk: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass --- board/freescale/imx8ulp_evk/imx8ulp_evk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/freescale/imx8ulp_evk/imx8ulp_evk.c b/board/freescale/imx8ulp_evk/imx8ulp_evk.c index 0af61067263..4bf77a488cc 100644 --- a/board/freescale/imx8ulp_evk/imx8ulp_evk.c +++ b/board/freescale/imx8ulp_evk/imx8ulp_evk.c @@ -3,6 +3,7 @@ * Copyright 2020 NXP */ +#include #include #include #include From 0b9450989c195430521b01d97ba79a9b644119a6 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:34 -0600 Subject: [PATCH 10/27] net: Include string.h in net-legacy.h This file uses memcpy() but does not include the header file. Update it. Reviewed-by: Jerome Forissier Signed-off-by: Simon Glass --- include/net-legacy.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net-legacy.h b/include/net-legacy.h index 51780999a88..a7dbcec1506 100644 --- a/include/net-legacy.h +++ b/include/net-legacy.h @@ -17,6 +17,7 @@ #include #include #include +#include struct bd_info; struct cmd_tbl; From 600145a8e10418d26f43045f9452610e39ce6f38 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:35 -0600 Subject: [PATCH 11/27] venice: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass --- board/gateworks/venice/venice.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/gateworks/venice/venice.c b/board/gateworks/venice/venice.c index 98b33624f04..f9bcdd8496e 100644 --- a/board/gateworks/venice/venice.c +++ b/board/gateworks/venice/venice.c @@ -3,6 +3,7 @@ * Copyright 2021 Gateworks Corporation */ +#include #include #include #include From b4135116116a318113968ce9f8f72c711d09dd28 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:36 -0600 Subject: [PATCH 12/27] phytec: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass --- board/phytec/common/phytec_som_detection_blocks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/phytec/common/phytec_som_detection_blocks.c b/board/phytec/common/phytec_som_detection_blocks.c index 5f3c27ef0c2..b44ff85972f 100644 --- a/board/phytec/common/phytec_som_detection_blocks.c +++ b/board/phytec/common/phytec_som_detection_blocks.c @@ -4,6 +4,7 @@ * Author: Daniel Schultz */ +#include #include #include #include From 6e898e332b0e7e11ebeb83bdbfcd9e3e1600817a Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:37 -0600 Subject: [PATCH 13/27] ronetix: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass --- board/ronetix/imx8mq-cm/imx8mq_cm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/ronetix/imx8mq-cm/imx8mq_cm.c b/board/ronetix/imx8mq-cm/imx8mq_cm.c index fbee2c39771..602216854ba 100644 --- a/board/ronetix/imx8mq-cm/imx8mq_cm.c +++ b/board/ronetix/imx8mq-cm/imx8mq_cm.c @@ -3,6 +3,7 @@ * Copyright 2018 NXP */ +#include #include #include #include From bcf10f16ea41cd690be59a88d8e7292881d01e56 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:38 -0600 Subject: [PATCH 14/27] toradex: Include env.h to permit reading the environment Two files read from the environment but don't not include the correct header. Update them. Signed-off-by: Simon Glass --- board/toradex/colibri_imx7/colibri_imx7.c | 1 + board/toradex/verdin-imx8mm/verdin-imx8mm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c index 7de29e3abfb..69a8a18d3a7 100644 --- a/board/toradex/colibri_imx7/colibri_imx7.c +++ b/board/toradex/colibri_imx7/colibri_imx7.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/toradex/verdin-imx8mm/verdin-imx8mm.c b/board/toradex/verdin-imx8mm/verdin-imx8mm.c index 9359e0ac6bf..066e8db678f 100644 --- a/board/toradex/verdin-imx8mm/verdin-imx8mm.c +++ b/board/toradex/verdin-imx8mm/verdin-imx8mm.c @@ -3,7 +3,7 @@ * Copyright 2020-2021 Toradex */ -#include +#include #include #include #include From 0f8a4a9c4427370c5f20b8ffcbd615fb9658921e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:39 -0600 Subject: [PATCH 15/27] advantech: Include env.h in imx8qm_dmsse20_a1 This file uses the environment but does not include the header file. Update it. Acked-by: Oliver Graute Signed-off-by: Simon Glass --- board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c index 50b35db5f6c..accd300df04 100644 --- a/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c +++ b/board/advantech/imx8qm_dmsse20_a1/imx8qm_dmsse20_a1.c @@ -4,6 +4,7 @@ * Copyright 2019-2023 Kococonnector GmbH */ +#include #include #include #include From 433e86abea7e8b570ee0ad89842ac806511d1b94 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:40 -0600 Subject: [PATCH 16/27] tegra: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass --- arch/arm/mach-tegra/dt-setup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-tegra/dt-setup.c b/arch/arm/mach-tegra/dt-setup.c index f4ae602d523..96044ac78ce 100644 --- a/arch/arm/mach-tegra/dt-setup.c +++ b/arch/arm/mach-tegra/dt-setup.c @@ -3,6 +3,7 @@ * Copyright (c) 2010-2016, NVIDIA CORPORATION. */ +#include #include #include #include From f24a197973ad0c5f473401b16a801794f2764678 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:41 -0600 Subject: [PATCH 17/27] synology: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Reviewed-by: Stefan Roese Reviewed-by: Tony Dinh Signed-off-by: Simon Glass --- board/Synology/ds414/ds414.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/Synology/ds414/ds414.c b/board/Synology/ds414/ds414.c index 1a4cea87e1a..02d6a4a1ea8 100644 --- a/board/Synology/ds414/ds414.c +++ b/board/Synology/ds414/ds414.c @@ -4,6 +4,7 @@ * Copyright (C) 2015 Phil Sutter */ +#include #include #include #include From 6d9d6ba71ab9391e5fb163634bfb1cc65987cdd4 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:42 -0600 Subject: [PATCH 18/27] amlogic: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Reviewed-by: Viacheslav Bocharov Signed-off-by: Simon Glass --- board/amlogic/jethub-j100/jethub-j100.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/amlogic/jethub-j100/jethub-j100.c b/board/amlogic/jethub-j100/jethub-j100.c index b770a1f8c53..9e87fb9f9d7 100644 --- a/board/amlogic/jethub-j100/jethub-j100.c +++ b/board/amlogic/jethub-j100/jethub-j100.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include From 2876ff79b257667438ae7a6132d5ce750ec501ac Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:43 -0600 Subject: [PATCH 19/27] freescale: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass --- board/freescale/mx7dsabresd/mx7dsabresd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/freescale/mx7dsabresd/mx7dsabresd.c b/board/freescale/mx7dsabresd/mx7dsabresd.c index 3db167c0dad..bef4f901ff7 100644 --- a/board/freescale/mx7dsabresd/mx7dsabresd.c +++ b/board/freescale/mx7dsabresd/mx7dsabresd.c @@ -3,6 +3,7 @@ * Copyright (C) 2015 Freescale Semiconductor, Inc. */ +#include #include #include #include From 98faae1617b44e53c475adf8552245691e1f05fb Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:44 -0600 Subject: [PATCH 20/27] google: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass --- board/google/chameleonv3/board.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/board/google/chameleonv3/board.c b/board/google/chameleonv3/board.c index 4d3049689d3..d8ffdd25b38 100644 --- a/board/google/chameleonv3/board.c +++ b/board/google/chameleonv3/board.c @@ -2,6 +2,8 @@ /* * Copyright 2022 Google LLC */ + +#include #include #include #include "mercury_aa1.h" From ea9afef22d49a4ac12484e01fd459e225da790b7 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:45 -0600 Subject: [PATCH 21/27] liebherr: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass Reviewed-by: Lukasz Majewski --- board/liebherr/xea/xea.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/liebherr/xea/xea.c b/board/liebherr/xea/xea.c index 1d4f165fd13..9630e7f576b 100644 --- a/board/liebherr/xea/xea.c +++ b/board/liebherr/xea/xea.c @@ -13,6 +13,7 @@ * */ +#include #include #include #include From 7b612cfa757a44d1bdee6d087e24e2e5c9d8a868 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:46 -0600 Subject: [PATCH 22/27] technexion: Include env.h to permit reading the environment This file reads from the environment but does not include the correct header. Update it. Signed-off-by: Simon Glass --- board/technexion/pico-imx7d/pico-imx7d.c | 1 + 1 file changed, 1 insertion(+) diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index d0f739c624a..cf6b7fcbd95 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -3,6 +3,7 @@ * Copyright (C) 2017 NXP Semiconductors */ +#include #include #include #include From 22d4e22a3d2e8a95c37c0635701daaee8d5a5c6b Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:47 -0600 Subject: [PATCH 23/27] net: Include byteorder in net6.h This file uses byteorder but does not include the header file. Update it. Signed-off-by: Simon Glass --- include/net6.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/net6.h b/include/net6.h index 2ceeaba0639..39573e490a6 100644 --- a/include/net6.h +++ b/include/net6.h @@ -11,6 +11,7 @@ #define __NET6_H__ #include +#include #include #include From 85b013e3f43ff4fa50ced6a23ba336813eaf9320 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:48 -0600 Subject: [PATCH 24/27] net: Include env.h in pcap.c This file uses the environment but does not include the header file. Update it. Signed-off-by: Simon Glass --- net/pcap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/pcap.c b/net/pcap.c index c959e3e4e51..d1d6f705cda 100644 --- a/net/pcap.c +++ b/net/pcap.c @@ -3,6 +3,7 @@ * Copyright 2019 Ramon Fried */ +#include #include #include #include From 183d88cdfc19ea7bd56af69512f0d1425de73e77 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 15 May 2025 17:31:49 -0600 Subject: [PATCH 25/27] net: dc2114x: Include env.h to permit reading the environment This file uses the environment but does not include the header file. Update it. Signed-off-by: Simon Glass --- drivers/net/dc2114x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dc2114x.c b/drivers/net/dc2114x.c index 7c0665faa8e..8fa549280aa 100644 --- a/drivers/net/dc2114x.c +++ b/drivers/net/dc2114x.c @@ -3,6 +3,7 @@ #include #include #include +#include #include #include #include From ae9ff5ae6f579f321a1b695c82453b67ec1bf6db Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 15 May 2025 17:31:50 -0600 Subject: [PATCH 26/27] global: Avoid indirect inclusion of from Now that env_get_ip() has been removed, the include file does not need anything from . Furthermore, include/env.h itself includes other headers which can lead to longer indirect inclusion paths. To prepare to remove from fix all of the remaining places which had relied on this indirect inclusion to instead include directly. Reviewed-by: Jerome Forissier # net/lwip Acked-by: Ilias Apalodimas Reviewed-by: Wolfgang Wallner Reviewed-by: Martyn Welch Signed-off-by: Tom Rini --- board/BuR/brppt2/board.c | 1 + board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c | 1 + board/andestech/ae350/ae350.c | 1 + board/data_modul/common/common.c | 1 + board/gateworks/gw_ventana/gw_ventana.c | 1 + board/ge/b1x5v2/b1x5v2.c | 1 + board/keymile/kmcent2/kmcent2.c | 1 + board/purism/librem5/librem5.c | 1 + board/siemens/iot2050/board.c | 1 + board/ti/j721e/evm.c | 1 + boot/bootmeth_efi.c | 1 + boot/bootmeth_pxe.c | 1 + cmd/pxe.c | 1 + drivers/net/pfe_eth/pfe_firmware.c | 1 + lib/efi_loader/efi_bootmgr.c | 1 + lib/efi_loader/efi_net.c | 1 + net/lwip/dhcp.c | 1 + net/lwip/dns.c | 1 + net/lwip/net-lwip.c | 1 + net/lwip/tftp.c | 1 + net/lwip/wget.c | 1 + test/dm/dsa.c | 1 + 22 files changed, 22 insertions(+) diff --git a/board/BuR/brppt2/board.c b/board/BuR/brppt2/board.c index c0a163251b4..de206bdf1bc 100644 --- a/board/BuR/brppt2/board.c +++ b/board/BuR/brppt2/board.c @@ -7,6 +7,7 @@ * */ #include +#include #include #include #include diff --git a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c index b9f47006d61..8c9e9830876 100644 --- a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c +++ b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/andestech/ae350/ae350.c b/board/andestech/ae350/ae350.c index 1d9d4a929c2..9bdd2ab1780 100644 --- a/board/andestech/ae350/ae350.c +++ b/board/andestech/ae350/ae350.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/data_modul/common/common.c b/board/data_modul/common/common.c index 9e35dc5d6cb..7d344792937 100644 --- a/board/data_modul/common/common.c +++ b/board/data_modul/common/common.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c index 21a908c20dd..457d8281a66 100644 --- a/board/gateworks/gw_ventana/gw_ventana.c +++ b/board/gateworks/gw_ventana/gw_ventana.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/ge/b1x5v2/b1x5v2.c b/board/ge/b1x5v2/b1x5v2.c index c1aacd1458b..ddb7304d493 100644 --- a/board/ge/b1x5v2/b1x5v2.c +++ b/board/ge/b1x5v2/b1x5v2.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/board/keymile/kmcent2/kmcent2.c b/board/keymile/kmcent2/kmcent2.c index 783853d5c6f..0f43ebfec4d 100644 --- a/board/keymile/kmcent2/kmcent2.c +++ b/board/keymile/kmcent2/kmcent2.c @@ -6,6 +6,7 @@ * Copyright 2013 Freescale Semiconductor, Inc. */ +#include #include #include #include diff --git a/board/purism/librem5/librem5.c b/board/purism/librem5/librem5.c index 8ca8792fa42..5178ee6929d 100644 --- a/board/purism/librem5/librem5.c +++ b/board/purism/librem5/librem5.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c index d827f728a08..161210c60a9 100644 --- a/board/siemens/iot2050/board.c +++ b/board/siemens/iot2050/board.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c index 0525f6e6f97..b1ed29af001 100644 --- a/board/ti/j721e/evm.c +++ b/board/ti/j721e/evm.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c index 0c9b4c3d59d..0af23df3a4a 100644 --- a/boot/bootmeth_efi.c +++ b/boot/bootmeth_efi.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c index 6e5e0f99ea4..faa8d729b15 100644 --- a/boot/bootmeth_pxe.c +++ b/boot/bootmeth_pxe.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/pxe.c b/cmd/pxe.c index 0f26b3b4219..e82247af6c0 100644 --- a/cmd/pxe.c +++ b/cmd/pxe.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/drivers/net/pfe_eth/pfe_firmware.c b/drivers/net/pfe_eth/pfe_firmware.c index da4f2ca42a5..b821fb17a1d 100644 --- a/drivers/net/pfe_eth/pfe_firmware.c +++ b/drivers/net/pfe_eth/pfe_firmware.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c index c0df5cb9acd..298149bcc33 100644 --- a/lib/efi_loader/efi_bootmgr.c +++ b/lib/efi_loader/efi_bootmgr.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c index b3291b4f1d5..9db738ead9d 100644 --- a/lib/efi_loader/efi_net.c +++ b/lib/efi_loader/efi_net.c @@ -18,6 +18,7 @@ #define LOG_CATEGORY LOGC_EFI #include +#include #include #include #include diff --git a/net/lwip/dhcp.c b/net/lwip/dhcp.c index 92bd7067a7f..043d2ab6e94 100644 --- a/net/lwip/dhcp.c +++ b/net/lwip/dhcp.c @@ -3,6 +3,7 @@ #include #include +#include #include #include #include diff --git a/net/lwip/dns.c b/net/lwip/dns.c index 19172ac959a..6862869d9e3 100644 --- a/net/lwip/dns.c +++ b/net/lwip/dns.c @@ -3,6 +3,7 @@ #include #include +#include #include #include #include diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c index f05c4cd3f64..abc52b32049 100644 --- a/net/lwip/net-lwip.c +++ b/net/lwip/net-lwip.c @@ -3,6 +3,7 @@ /* Copyright (C) 2024 Linaro Ltd. */ #include +#include #include #include #include diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c index 4f9b2049187..56d27f82121 100644 --- a/net/lwip/tftp.c +++ b/net/lwip/tftp.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/net/lwip/wget.c b/net/lwip/wget.c index a3b82908877..46c16edcc44 100644 --- a/net/lwip/wget.c +++ b/net/lwip/wget.c @@ -5,6 +5,7 @@ #include #include #include +#include #include #include #include "lwip/altcp_tls.h" diff --git a/test/dm/dsa.c b/test/dm/dsa.c index 9a31ae39d95..46e48741fba 100644 --- a/test/dm/dsa.c +++ b/test/dm/dsa.c @@ -3,6 +3,7 @@ * Copyright 2020-2021 NXP */ +#include #include #include #include From fe33175c073fe21945b39a4a8c27806cf0154bf3 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Thu, 15 May 2025 17:31:51 -0600 Subject: [PATCH 27/27] include/net.h: Drop Now that all of the cases of code that relied on to provide (or one of the headers that it includes, and so forth) have been fixed, we can drop the include from here. Signed-off-by: Tom Rini --- include/net-common.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/net-common.h b/include/net-common.h index 2ca565fe4ed..9e82b280df2 100644 --- a/include/net-common.h +++ b/include/net-common.h @@ -5,7 +5,6 @@ #include #include -#include #include #include #include