]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
global: Avoid indirect inclusion of <env.h> from <command.h>
authorTom Rini <trini@konsulko.com>
Wed, 14 May 2025 22:46:03 +0000 (16:46 -0600)
committerTom Rini <trini@konsulko.com>
Thu, 29 May 2025 14:29:16 +0000 (08:29 -0600)
The include file <command.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
<command.h> fix all of the places which had relied on this indirect
inclusion to instead include <env.h> directly.

Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> # android, bcb
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> # spawn
Signed-off-by: Tom Rini <trini@konsulko.com>
51 files changed:
arch/arm/cpu/armv8/fsl-layerscape/fdt.c
arch/arm/mach-apple/board.c
arch/arm/mach-k3/r5/common.c
arch/arm/mach-socfpga/board.c
arch/arm/mach-stm32mp/cmd_stm32prog/cmd_stm32prog.c
board/liebherr/mccmon6/spl.c
board/siemens/common/board_am335x.c
board/socionext/developerbox/fwu_plat.c
boot/bootmeth_android.c
cmd/abootimg.c
cmd/adc.c
cmd/armflash.c
cmd/bcb.c
cmd/blkmap.c
cmd/bootflow.c
cmd/booti.c
cmd/bootmeth.c
cmd/broadcom/nitro_image_load.c
cmd/extension_board.c
cmd/hash.c
cmd/mbr.c
cmd/mem.c
cmd/mmc.c
cmd/sandbox/exception.c
cmd/seama.c
cmd/spawn.c
cmd/upl.c
cmd/x86/zboot.c
common/usb.c
drivers/power/axp221.c
drivers/video/nexell_display.c
lib/efi_loader/efi_firmware.c
test/boot/bootdev.c
test/boot/bootflow.c
test/boot/bootm.c
test/boot/bootmeth.c
test/boot/measurement.c
test/boot/upl.c
test/cmd/fdt.c
test/cmd/hash.c
test/cmd/mem_search.c
test/cmd/setexpr.c
test/common/test_autoboot.c
test/dm/blkmap.c
test/dm/button.c
test/dm/fastboot.c
test/dm/part.c
test/env/fdt.c
test/hush/dollar.c
test/hush/if.c
test/hush/loop.c

index ca6be3626fbeeaee5e24342724164e60bcf3c9a6..e8d2339f1a3bde941fdc82c96983542ffd44dba3 100644 (file)
@@ -7,6 +7,7 @@
 #include <config.h>
 #include <clock_legacy.h>
 #include <efi_loader.h>
+#include <env.h>
 #include <log.h>
 #include <asm/cache.h>
 #include <linux/libfdt.h>
index 2644a04a622875a885ab4dd5f038b4cbd0978646..2604c5a710eff39bdd7406864c3ab995cce63649 100644 (file)
@@ -6,6 +6,7 @@
 #include <dm.h>
 #include <dm/uclass-internal.h>
 #include <efi_loader.h>
+#include <env.h>
 #include <lmb.h>
 
 #include <asm/armv8/mmu.h>
index 0b6604039f3e346f391ba49140e58c006c1f502e..fa146549f13725bd0abb9839149eeff3ef44324c 100644 (file)
@@ -5,6 +5,7 @@
  * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
  */
 
+#include <env.h>
 #include <linux/printk.h>
 #include <linux/types.h>
 #include <asm/hardware.h>
index 8506d5104134a8d94b4ee8c2c457620a568993f8..bda12324803383bf1572f5492d34e700c34ba73e 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <config.h>
 #include <errno.h>
+#include <env.h>
 #include <fdtdec.h>
 #include <log.h>
 #include <init.h>
index 04640e476e6bf6ead7843ace6ffd252543fbdc41..506ecac2ef0860cc64c7fa92ddede0ed5b62e87f 100644 (file)
@@ -6,6 +6,7 @@
 #include <bootm.h>
 #include <command.h>
 #include <dfu.h>
+#include <env.h>
 #include <image.h>
 #include <asm/arch/stm32prog.h>
 #include <linux/printk.h>
index b1f6881275d5063c88fc7b4da6248c6da57453ce..e612d9e9ce033cb637a25e5396d521fe4673582e 100644 (file)
@@ -5,6 +5,7 @@
  *         Richard Hu <hakahu@gmail.com>
  */
 
+#include <env.h>
 #include <image.h>
 #include <init.h>
 #include <asm/arch/clock.h>
index daf0bb930ec0814a142dc35c3216245aae16f6fc..939ff81797dd80afbe8b21bae6a8116c5fa990f8 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 #include <serial.h>
 #include <watchdog.h>
 #include <asm/arch/clock.h>
index a8b111477ef908e8c9834515b6b31b3b4a2cc157..5d2f40f241ce00b4d6457ee5d8b7cab284b02723 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <efi_loader.h>
+#include <env.h>
 #include <fwu.h>
 #include <fwu_mdata.h>
 #include <memalign.h>
index 654ebfdf1fcc46c54b7731a70bdef1072880fc8c..8c2bde10e171f2141cb544586bd6e1d34efb9959 100644 (file)
@@ -18,6 +18,7 @@
 #include <bootm.h>
 #include <bootmeth.h>
 #include <dm.h>
+#include <env.h>
 #include <image.h>
 #include <malloc.h>
 #include <mapmem.h>
index ae7a1a7c83b043ba8656d6f91f2410db4d1f1094..44de00fb9c974b2e7aee4b3f1490d3adfd34b731 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <android_image.h>
 #include <command.h>
+#include <env.h>
 #include <image.h>
 #include <mapmem.h>
 
index 4d3b5b61f6f0236c1d74db5b2a86adc38a94340b..334ba7fdeca8435eaaa1bc4a73336e329dacc4a7 100644 (file)
--- a/cmd/adc.c
+++ b/cmd/adc.c
@@ -5,6 +5,7 @@
  */
 #include <command.h>
 #include <dm.h>
+#include <env.h>
 #include <adc.h>
 #include <linux/printk.h>
 
index 83f616db4efb7db6f73b4070e2ee901b247baa72..cde275c881b1ab446e777d5b5e0020c79630cb06 100644 (file)
@@ -7,6 +7,7 @@
  */
 #include <command.h>
 #include <console.h>
+#include <env.h>
 #include <flash.h>
 #include <vsprintf.h>
 #include <linux/string.h>
index 16eabfe00f5a443f710e5084d187e374f89f6d3a..d6d944bd6b31b4402f72b215885323d61e6e7825 100644 (file)
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -8,6 +8,7 @@
 #include <android_bootloader_message.h>
 #include <bcb.h>
 #include <command.h>
+#include <env.h>
 #include <android_ab.h>
 #include <display_options.h>
 #include <log.h>
index 86a123b1cd37ac4eb15945bd3d16e13194eee7e3..65edec899e2cf21f7cfd029e02049255d063264e 100644 (file)
@@ -7,6 +7,7 @@
 #include <blk.h>
 #include <blkmap.h>
 #include <command.h>
+#include <env.h>
 #include <malloc.h>
 #include <dm/device.h>
 
index a1fd59a69f478f76eb8baad817a9ccc98942d5a5..d4f7d336150099800068851877415a71b4e0284b 100644 (file)
@@ -13,6 +13,7 @@
 #include <command.h>
 #include <console.h>
 #include <dm.h>
+#include <env.h>
 #include <mapmem.h>
 
 /**
index 1a57fe91397787729388ec144b289a47247c014e..7e6d94262993f219929f1c0aae472435b001f4d4 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <bootm.h>
 #include <command.h>
+#include <env.h>
 #include <image.h>
 #include <irq_func.h>
 #include <lmb.h>
index 2f41fa1bec6b7c738cf9d92d3f020880962e8f15..ea4b3f47db8a7b0e315f5bd3441ed2b4fb0c5966 100644 (file)
@@ -11,6 +11,7 @@
 #include <bootstd.h>
 #include <command.h>
 #include <dm.h>
+#include <env.h>
 #include <malloc.h>
 #include <dm/uclass-internal.h>
 
index 289b184e9afdcbbb79f683ce9e4f6b50c761f003..fe08679840ef0b454e077a45d900ab70c352da2c 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 #include <vsprintf.h>
 
 #define FW_IMAGE_SIG   0xff123456
index 6c14d0ddebdcee7539eab1ee40ec908f9dc59006..317b260bf36a94b33674c9fcaefde24aabbbb730 100644 (file)
@@ -7,6 +7,7 @@
 #include <bootdev.h>
 #include <command.h>
 #include <dm.h>
+#include <env.h>
 #include <malloc.h>
 #include <extension_board.h>
 #include <mapmem.h>
index 5b40982b098d31f8854b611d5993d944c7a0aefc..96d0e443a5b645bcddd0430e834e71111f4807ad 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 #include <hash.h>
 #include <linux/ctype.h>
 
index 7e1f92a13bb5eaa481991d05c14bab360bf0bd32..7fe6c9e103ab7b80592487b775a240a6c7bf1c27 100644 (file)
--- a/cmd/mbr.c
+++ b/cmd/mbr.c
@@ -10,6 +10,7 @@
 
 #include <blk.h>
 #include <command.h>
+#include <env.h>
 #include <malloc.h>
 #include <part.h>
 #include <vsprintf.h>
index e5b9cb2934919801cfa7a7dd781ced771593e952..b8afe62e4749f060aee7ac06fec48a9b44ec7fdc 100644 (file)
--- a/cmd/mem.c
+++ b/cmd/mem.c
@@ -17,6 +17,7 @@
 #include <compiler.h>
 #include <console.h>
 #include <display_options.h>
+#include <env.h>
 #ifdef CONFIG_MTD_NOR_FLASH
 #include <flash.h>
 #endif
index fe7899ec793c4492d3d0f6f21762dd4b5b265529..5340a58be8ee4ff6b83bba60faee4c67c3a72639 100644 (file)
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <console.h>
 #include <display_options.h>
+#include <env.h>
 #include <mapmem.h>
 #include <memalign.h>
 #include <mmc.h>
index f9c847d8ff28312396f55e48b1efc862eeffcebb..e015acf60e2b789c72a6243a0215df29d54c0d05 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 
 static int do_sigsegv(struct cmd_tbl *cmdtp, int flag, int argc,
                      char *const argv[])
index 3c8e819923400c93d3957e99d23ab9e1862fcb84..d628797809062fd8b6507b6ee9d27a731a3362f6 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 #include <nand.h>
 
 /*
index 37737b8627c84dc165d4c0e457879bad6f7090f9..8829aa9728d2db7b737cce8a261120aceaae2c3d 100644 (file)
@@ -5,6 +5,7 @@
 
 #include <command.h>
 #include <console.h>
+#include <env.h>
 #include <malloc.h>
 #include <vsprintf.h>
 #include <uthread.h>
index c9a823bbc064a347508053e51887aab3f190a1a2..ef2183d852815dac47c58753cc9f80d22cba9c9e 100644 (file)
--- a/cmd/upl.c
+++ b/cmd/upl.c
@@ -12,6 +12,7 @@
 #include <alist.h>
 #include <command.h>
 #include <display_options.h>
+#include <env.h>
 #include <mapmem.h>
 #include <string.h>
 #include <upl.h>
index 94e602b8a5b60d682c21b4483870d93b1bd3627e..3876d163236254688cd0d841d64f67b4f603ba1a 100644 (file)
@@ -8,6 +8,7 @@
 #define LOG_CATEGORY   LOGC_BOOT
 
 #include <command.h>
+#include <env.h>
 #include <mapmem.h>
 #include <vsprintf.h>
 #include <asm/zimage.h>
index 7a8435296c67b651479ad406a9afb8605000a27e..6a4ad346f4bac56a094166146a9bd13870e0725d 100644 (file)
@@ -28,6 +28,7 @@
 #include <command.h>
 #include <dm.h>
 #include <dm/device_compat.h>
+#include <env.h>
 #include <log.h>
 #include <malloc.h>
 #include <memalign.h>
index c22ca03f46948c9dba4e233ada1199d3860e9d8c..f5daa24308217daf5e4b3cc479b09948ac740c68 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 #include <errno.h>
 #include <asm/arch/pmic_bus.h>
 #include <axp_pmic.h>
index 7bda33fb16e10e57a91d485d3c03051028726ead..ea3776258a005a9262583e6e860c19d73a5cc3da 100644 (file)
@@ -10,6 +10,7 @@
 #include <config.h>
 #include <command.h>
 #include <dm.h>
+#include <env.h>
 #include <mapmem.h>
 #include <malloc.h>
 #include <linux/compat.h>
index d44dc09813e36604aac0cc77983ec8ffc2d9cff9..75501e21557577c00f561d8f1a00c16fa388b56b 100644 (file)
@@ -12,6 +12,7 @@
 #include <dfu.h>
 #include <efi_loader.h>
 #include <efi_variable.h>
+#include <env.h>
 #include <fwu.h>
 #include <image.h>
 #include <signatures.h>
index 9af947868707181b747499d8f3b9bac20b686f34..a5f3d4462a94a9d0e8dcca25a38546b6a36ea9a4 100644 (file)
@@ -10,6 +10,7 @@
 #include <dm.h>
 #include <bootdev.h>
 #include <bootflow.h>
+#include <env.h>
 #include <mapmem.h>
 #include <os.h>
 #include <test/ut.h>
index b261bd5f620e0a73dae400576b9029ce81c101dd..a930d2cc309a21b9fb3855b30b22e3b68098b4f0 100644 (file)
@@ -14,6 +14,7 @@
 #include <dm.h>
 #include <efi.h>
 #include <efi_loader.h>
+#include <env.h>
 #include <expo.h>
 #include <mapmem.h>
 #ifdef CONFIG_SANDBOX
index 1d1efe71ad5287bb7fa40dc7090153dd74463412..ed60094f3c1a8ab3d8aed3014a9446649e438f25 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <bootm.h>
+#include <env.h>
 #include <asm/global_data.h>
 #include <test/test.h>
 #include <test/ut.h>
index 577f259fb3718386c1212293d9833a76a4d17fd8..2ef3569ad8377052e640cee7e08d6dfd9d160278 100644 (file)
@@ -9,6 +9,7 @@
 #include <bootmeth.h>
 #include <bootstd.h>
 #include <dm.h>
+#include <env.h>
 #include <test/ut.h>
 #include "bootstd_common.h"
 
index 1d38663fc0f8b8be77373783e058faf445b2dd27..71f503f1567d5fcf86636041fd63c704089469f9 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <bootm.h>
+#include <env.h>
 #include <malloc.h>
 #include <test/test.h>
 #include <test/ut.h>
index eec89026fc301e5898e5cddf0e9c2a3acffe22bc..e2dc3d51edaa9a3c805f9256dd1e7bbc07d72e2d 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <abuf.h>
+#include <env.h>
 #include <mapmem.h>
 #include <upl.h>
 #include <dm/ofnode.h>
index c11c181c807c9b8074260a0a737f13b800506ade..96a8488e1720052bc39cfca889f30644a913a01d 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <console.h>
+#include <env.h>
 #include <fdt_support.h>
 #include <mapmem.h>
 #include <asm/global_data.h>
index 296dd762b31d028565b2cab19597904444fae9fb..bb96380c351a80de01e4f32b8998fb525be4cb5b 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 #include <dm.h>
 #include <dm/test.h>
 #include <test/test.h>
index df8938bdb6c64d3ee7e14e0c7a66622bf26243df..61de0dfb9a98e7829a28ce5d6f273283cde9760b 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <console.h>
+#include <env.h>
 #include <mapmem.h>
 #include <dm/test.h>
 #include <test/ut.h>
index 85803eb54b8c7e726bca77666554c631f79a9a27..93b0c4b68f50c7aea2f68990e7788c1d24008ab0 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <console.h>
+#include <env.h>
 #include <mapmem.h>
 #include <dm/test.h>
 #include <test/ut.h>
index e3050d02c605b5df7f3962abae052d88cb980029..5feff57c2714ba96b7f0a573564ff4fa646231e8 100644 (file)
@@ -6,6 +6,7 @@
  */
 
 #include <autoboot.h>
+#include <env.h>
 #include <test/common.h>
 #include <test/test.h>
 #include <test/ut.h>
index a6a0b4d4e208f6b9b50b90d24f254d5b77d3f9ad..d04b68b50aece418db72e1cd944e8a7f686f8052 100644 (file)
@@ -7,6 +7,7 @@
 #include <blk.h>
 #include <blkmap.h>
 #include <dm.h>
+#include <env.h>
 #include <asm/test.h>
 #include <dm/test.h>
 #include <test/test.h>
index 3612f308f0297733da4c2449f9851d6e647066b7..f05f4ca27cebb1a3252fc5299dd1236cd0e668bc 100644 (file)
@@ -8,6 +8,7 @@
 #include <dm.h>
 #include <adc.h>
 #include <button.h>
+#include <env.h>
 #include <power/regulator.h>
 #include <power/sandbox_pmic.h>
 #include <asm/gpio.h>
index 73c43f8292407222d2d436d0411b8c51e053e69a..5b51b6bf9dd4b7bb978967437023afb043ec282f 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dm.h>
+#include <env.h>
 #include <fastboot.h>
 #include <fb_mmc.h>
 #include <mmc.h>
index c5c4b3fdba1b74486ca91cef88e2b4c451d835e7..caae23bd4aadf0cbafacc5f5b9476d2add6333a1 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <dm.h>
+#include <env.h>
 #include <mmc.h>
 #include <part.h>
 #include <part_efi.h>
index c495ac7b307c0a430184f4e370c24bbb7ec28fd2..3652563f33045a6382fdbbaf4cc04b3f73b1ff66 100644 (file)
@@ -1,4 +1,5 @@
 #include <command.h>
+#include <env.h>
 #include <env_attr.h>
 #include <test/env.h>
 #include <test/ut.h>
index 820110799a20a0defa548b4cec3f415d1e125a96..b83a64d091d1a9af6060d2f23e75e7c3fdcd5820 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 #include <env_attr.h>
 #include <test/hush.h>
 #include <test/ut.h>
index 8939b7a6c86fc779bfeb38d901c8aa7a861051dd..ea615b246a9aa071190a392fc7db7d184d4fe3c9 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 #include <env_attr.h>
 #include <vsprintf.h>
 #include <test/hush.h>
index 7154b9bc0ae32b445f0c7762ca56bc28462758ff..ea72ac773bac60a439aa09c586f05e8d3862642f 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <command.h>
+#include <env.h>
 #include <env_attr.h>
 #include <test/hush.h>
 #include <test/ut.h>