On Fri, 16 May 2025 at 02:42, Tom Rini <tr...@konsulko.com> wrote: > > Now that env_get_ip() has been removed, the include file <net.h> does > not need anything from <env.h>. Furthermore, include/env.h itself > includes other headers which can lead to longer indirect inclusion > paths. To prepare to remove <env.h> from <net.h> fix all of the > remaining places which had relied on this indirect inclusion to instead > include <env.h> directly. >
Acked-by: Ilias Apalodimas <ilias.apalodi...@linaro.org> > Signed-off-by: Tom Rini <tr...@konsulko.com> > --- > Changes in v3: > - New patch > > Cc: "Huan 'Kitty' Wang" <huanw...@gehealthcare.com> > Cc: "Ying-Chun Liu (PaulLiu)" <paul....@linaro.org> > Cc: Angus Ainslie <an...@akkea.ca> (supporter:PURISM LIBREM5 PHONE) > Cc: Heinrich Schuchardt <xypron.g...@gmx.de> > Cc: Ian Ray <ian....@gehealthcare.com> > Cc: Ilias Apalodimas <ilias.apalodi...@linaro.org> > Cc: Jan Kiszka <jan.kis...@siemens.com> > Cc: Jerome Forissier <jerome.foriss...@linaro.org> > Cc: Joe Hershberger <joe.hershber...@ni.com> > Cc: Le Jin <le....@siemens.com> > Cc: Martyn Welch <martyn.we...@collabora.com> > Cc: Niel Fourie <lu...@denx.de> > Cc: Ramon Fried <rfried....@gmail.com> > Cc: Rick Chen <r...@andestech.com> > Cc: Simon Glass <s...@chromium.org> > Cc: Tim Harvey <thar...@gateworks.com> > Cc: Wolfgang Wallner <wolfgang.wall...@br-automation.com> > --- > 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 c0a163251b46..de206bdf1bc4 100644 > --- a/board/BuR/brppt2/board.c > +++ b/board/BuR/brppt2/board.c > @@ -7,6 +7,7 @@ > * > */ > #include <cpu_func.h> > +#include <env.h> > #include <hang.h> > #include <init.h> > #include <spl.h> > diff --git a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c > b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c > index b9f47006d610..8c9e98308765 100644 > --- a/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c > +++ b/board/advantech/imx8mp_rsb3720a1/imx8mp_rsb3720a1.c > @@ -7,6 +7,7 @@ > #include <dwc3-uboot.h> > #include <efi.h> > #include <efi_loader.h> > +#include <env.h> > #include <errno.h> > #include <miiphy.h> > #include <netdev.h> > diff --git a/board/andestech/ae350/ae350.c b/board/andestech/ae350/ae350.c > index 1d9d4a929c22..9bdd2ab17805 100644 > --- a/board/andestech/ae350/ae350.c > +++ b/board/andestech/ae350/ae350.c > @@ -6,6 +6,7 @@ > > #include <config.h> > #include <cpu_func.h> > +#include <env.h> > #include <flash.h> > #include <image.h> > #include <init.h> > diff --git a/board/data_modul/common/common.c > b/board/data_modul/common/common.c > index 9e35dc5d6cb1..7d344792937e 100644 > --- a/board/data_modul/common/common.c > +++ b/board/data_modul/common/common.c > @@ -12,6 +12,7 @@ > #include <asm/mach-imx/boot_mode.h> > #include <asm/mach-imx/iomux-v3.h> > #include <dm/uclass.h> > +#include <env.h> > #include <hang.h> > #include <i2c_eeprom.h> > #include <image.h> > diff --git a/board/gateworks/gw_ventana/gw_ventana.c > b/board/gateworks/gw_ventana/gw_ventana.c > index 21a908c20dd5..457d8281a664 100644 > --- a/board/gateworks/gw_ventana/gw_ventana.c > +++ b/board/gateworks/gw_ventana/gw_ventana.c > @@ -6,6 +6,7 @@ > */ > > #include <command.h> > +#include <env.h> > #include <fdt_support.h> > #include <gsc.h> > #include <hwconfig.h> > diff --git a/board/ge/b1x5v2/b1x5v2.c b/board/ge/b1x5v2/b1x5v2.c > index c1aacd1458b1..ddb7304d493a 100644 > --- a/board/ge/b1x5v2/b1x5v2.c > +++ b/board/ge/b1x5v2/b1x5v2.c > @@ -17,6 +17,7 @@ > #include <asm/io.h> > #include <asm/mach-imx/video.h> > #include <command.h> > +#include <env.h> > #include <i2c.h> > #include <input.h> > #include <ipu_pixfmt.h> > diff --git a/board/keymile/kmcent2/kmcent2.c b/board/keymile/kmcent2/kmcent2.c > index 783853d5c6f6..0f43ebfec4d5 100644 > --- a/board/keymile/kmcent2/kmcent2.c > +++ b/board/keymile/kmcent2/kmcent2.c > @@ -6,6 +6,7 @@ > * Copyright 2013 Freescale Semiconductor, Inc. > */ > > +#include <env.h> > #include <event.h> > #include <asm/cache.h> > #include <asm/fsl_fdt.h> > diff --git a/board/purism/librem5/librem5.c b/board/purism/librem5/librem5.c > index 8ca8792fa422..5178ee6929d8 100644 > --- a/board/purism/librem5/librem5.c > +++ b/board/purism/librem5/librem5.c > @@ -6,6 +6,7 @@ > > #include <malloc.h> > #include <errno.h> > +#include <env.h> > #include <asm/io.h> > #include <miiphy.h> > #include <asm/mach-imx/iomux-v3.h> > diff --git a/board/siemens/iot2050/board.c b/board/siemens/iot2050/board.c > index d827f728a08c..161210c60a96 100644 > --- a/board/siemens/iot2050/board.c > +++ b/board/siemens/iot2050/board.c > @@ -11,6 +11,7 @@ > #include <config.h> > #include <bootstage.h> > #include <dm.h> > +#include <env.h> > #include <fdt_support.h> > #include <i2c.h> > #include <led.h> > diff --git a/board/ti/j721e/evm.c b/board/ti/j721e/evm.c > index 0525f6e6f979..b1ed29af0018 100644 > --- a/board/ti/j721e/evm.c > +++ b/board/ti/j721e/evm.c > @@ -8,6 +8,7 @@ > */ > > #include <efi_loader.h> > +#include <env.h> > #include <generic-phy.h> > #include <image.h> > #include <net.h> > diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c > index 0c9b4c3d59dc..0af23df3a4a5 100644 > --- a/boot/bootmeth_efi.c > +++ b/boot/bootmeth_efi.c > @@ -15,6 +15,7 @@ > #include <dm.h> > #include <efi.h> > #include <efi_loader.h> > +#include <env.h> > #include <fs.h> > #include <malloc.h> > #include <mapmem.h> > diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c > index 6e5e0f99ea42..faa8d729b151 100644 > --- a/boot/bootmeth_pxe.c > +++ b/boot/bootmeth_pxe.c > @@ -13,6 +13,7 @@ > #include <bootmeth.h> > #include <command.h> > #include <dm.h> > +#include <env.h> > #include <extlinux.h> > #include <fs.h> > #include <log.h> > diff --git a/cmd/pxe.c b/cmd/pxe.c > index 0f26b3b42197..e82247af6c07 100644 > --- a/cmd/pxe.c > +++ b/cmd/pxe.c > @@ -5,6 +5,7 @@ > */ > > #include <command.h> > +#include <env.h> > #include <fs.h> > #include <net.h> > #include <net6.h> > diff --git a/drivers/net/pfe_eth/pfe_firmware.c > b/drivers/net/pfe_eth/pfe_firmware.c > index da4f2ca42a5b..b821fb17a1d6 100644 > --- a/drivers/net/pfe_eth/pfe_firmware.c > +++ b/drivers/net/pfe_eth/pfe_firmware.c > @@ -12,6 +12,7 @@ > > #include <dm.h> > #include <dm/device-internal.h> > +#include <env.h> > #include <image.h> > #include <log.h> > #include <malloc.h> > diff --git a/lib/efi_loader/efi_bootmgr.c b/lib/efi_loader/efi_bootmgr.c > index c0df5cb9acd9..298149bcc332 100644 > --- a/lib/efi_loader/efi_bootmgr.c > +++ b/lib/efi_loader/efi_bootmgr.c > @@ -12,6 +12,7 @@ > #include <charset.h> > #include <dm.h> > #include <efi.h> > +#include <env.h> > #include <log.h> > #include <malloc.h> > #include <net.h> > diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c > index b3291b4f1d52..9db738ead9dd 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 <efi_loader.h> > +#include <env.h> > #include <dm.h> > #include <linux/sizes.h> > #include <malloc.h> > diff --git a/net/lwip/dhcp.c b/net/lwip/dhcp.c > index 92bd7067a7fb..043d2ab6e946 100644 > --- a/net/lwip/dhcp.c > +++ b/net/lwip/dhcp.c > @@ -3,6 +3,7 @@ > > #include <command.h> > #include <console.h> > +#include <env.h> > #include <log.h> > #include <dm/device.h> > #include <linux/delay.h> > diff --git a/net/lwip/dns.c b/net/lwip/dns.c > index 19172ac959ac..6862869d9e30 100644 > --- a/net/lwip/dns.c > +++ b/net/lwip/dns.c > @@ -3,6 +3,7 @@ > > #include <command.h> > #include <console.h> > +#include <env.h> > #include <lwip/dns.h> > #include <lwip/timeouts.h> > #include <net.h> > diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c > index f05c4cd3f64f..abc52b32049c 100644 > --- a/net/lwip/net-lwip.c > +++ b/net/lwip/net-lwip.c > @@ -3,6 +3,7 @@ > /* Copyright (C) 2024 Linaro Ltd. */ > > #include <command.h> > +#include <env.h> > #include <dm/device.h> > #include <dm/uclass.h> > #include <hexdump.h> > diff --git a/net/lwip/tftp.c b/net/lwip/tftp.c > index 4f9b2049187c..56d27f821212 100644 > --- a/net/lwip/tftp.c > +++ b/net/lwip/tftp.c > @@ -6,6 +6,7 @@ > #include <display_options.h> > #include <dm/device.h> > #include <efi_loader.h> > +#include <env.h> > #include <image.h> > #include <linux/delay.h> > #include <lwip/apps/tftp_client.h> > diff --git a/net/lwip/wget.c b/net/lwip/wget.c > index a3b82908877f..46c16edcc440 100644 > --- a/net/lwip/wget.c > +++ b/net/lwip/wget.c > @@ -5,6 +5,7 @@ > #include <console.h> > #include <display_options.h> > #include <efi_loader.h> > +#include <env.h> > #include <image.h> > #include <lwip/apps/http_client.h> > #include "lwip/altcp_tls.h" > diff --git a/test/dm/dsa.c b/test/dm/dsa.c > index 9a31ae39d952..46e48741fbaa 100644 > --- a/test/dm/dsa.c > +++ b/test/dm/dsa.c > @@ -3,6 +3,7 @@ > * Copyright 2020-2021 NXP > */ > > +#include <env.h> > #include <net/dsa.h> > #include <dm/test.h> > #include <test/ut.h> > -- > 2.43.0 >