From a510bc2c9a310a6204b4587c8c2c2e0962380e31 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:06 -0600 Subject: include/ahci.h: Audit include list This file does not need but does directly need . Signed-off-by: Tom Rini --- include/ahci.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/ahci.h b/include/ahci.h index eb05cc687f6..470cda006de 100644 --- a/include/ahci.h +++ b/include/ahci.h @@ -7,7 +7,7 @@ #ifndef _AHCI_H_ #define _AHCI_H_ -#include +#include #define AHCI_PCI_BAR 0x24 #define AHCI_MAX_SG 56 /* hardware max is 64K */ -- cgit v1.3.1 From 6a891bb78cdc0f920bcae700af26f192421f93cd Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:07 -0600 Subject: include/arm_ffa.h: Audit include list This file does not need but does directly need . Signed-off-by: Tom Rini --- include/arm_ffa.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/arm_ffa.h b/include/arm_ffa.h index db9b1be995e..2994d8ee3ae 100644 --- a/include/arm_ffa.h +++ b/include/arm_ffa.h @@ -9,7 +9,7 @@ #ifndef __ARM_FFA_H #define __ARM_FFA_H -#include +#include /* * This header is public. It can be used by clients to access -- cgit v1.3.1 From 377c75f8c5588126259ff82bd33eaa3090853cb8 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:08 -0600 Subject: include/bios_emul.h: Audit include list This file does not need but does directly need . Furthermore, arch/x86/lib/bios.c was getting via so add it there. Signed-off-by: Tom Rini --- arch/x86/lib/bios.c | 1 + include/bios_emul.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index de4578666fb..77a8117d158 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include diff --git a/include/bios_emul.h b/include/bios_emul.h index a7e6d73972c..47a45296cc3 100644 --- a/include/bios_emul.h +++ b/include/bios_emul.h @@ -8,7 +8,7 @@ /* Include the register header directly here */ #include "../drivers/bios_emulator/include/x86emu/regs.h" -#include +#include /**************************************************************************** REMARKS: -- cgit v1.3.1 From 48703b2d6b7c87a523e794a711fe5c0d86f15093 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:09 -0600 Subject: include/bootflow.h: Audit include list This file does not need but does directly need . Signed-off-by: Tom Rini --- include/bootflow.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/bootflow.h b/include/bootflow.h index d408b8c85bd..5a9ac5ed3b3 100644 --- a/include/bootflow.h +++ b/include/bootflow.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include struct bootstd_priv; struct expo; -- cgit v1.3.1 From 5bbc8b5c55102145ba06bee4cfa7276f293d9c31 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:10 -0600 Subject: include/bootstd.h: Audit include list This file does not need so remove it. Signed-off-by: Tom Rini --- include/bootstd.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/bootstd.h b/include/bootstd.h index 2bc464756dd..f2fb5f55faa 100644 --- a/include/bootstd.h +++ b/include/bootstd.h @@ -11,7 +11,6 @@ #include #include -#include #include struct udevice; -- cgit v1.3.1 From 5d14fca77af7f2d4d950e0656329b03b9f5a2525 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:11 -0600 Subject: include/cadence-nand.h: Audit include list This file does not need but does directly need . Signed-off-by: Tom Rini --- include/cadence-nand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/cadence-nand.h b/include/cadence-nand.h index 27ed217b1ed..f08dce19cb9 100644 --- a/include/cadence-nand.h +++ b/include/cadence-nand.h @@ -12,7 +12,7 @@ #define _CADENCE_NAND_H_ #include #include -#include +#include #include /* -- cgit v1.3.1 From ef560b42ec1f5db103ca8be8c4532c55ff0151f3 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:12 -0600 Subject: include/cbfs.h: Audit include list This file does not need but does directly need . Signed-off-by: Tom Rini --- include/cbfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/cbfs.h b/include/cbfs.h index 2bc5de2297e..1244dbdba0d 100644 --- a/include/cbfs.h +++ b/include/cbfs.h @@ -6,8 +6,8 @@ #ifndef __CBFS_H #define __CBFS_H -#include #include +#include struct cbfs_priv; -- cgit v1.3.1 From cad8e2033332c1693d03fbdcb1c07f788974c2ec Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:13 -0600 Subject: include/compiler.h: Audit include list This file does not need so remove it. Signed-off-by: Tom Rini --- include/compiler.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/compiler.h b/include/compiler.h index ef7b2cb1f7e..f2e1e09c598 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -60,8 +60,6 @@ # define __BIG_ENDIAN BIG_ENDIAN #endif -#include - typedef uint8_t __u8; typedef uint16_t __u16; typedef uint32_t __u32; -- cgit v1.3.1 From 1585d92a05517f5f0278dccb8d0a03012960d790 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:14 -0600 Subject: include/dfu.h: Audit include list This file does not need a forward declaration of 'struct list_head' as it includes so remove it. Reviewed-by: Mattijs Korpershoek Signed-off-by: Tom Rini --- include/dfu.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/dfu.h b/include/dfu.h index 12f9dfcdfcd..80593a906fd 100644 --- a/include/dfu.h +++ b/include/dfu.h @@ -173,7 +173,6 @@ struct dfu_entity { unsigned int inited:1; }; -struct list_head; extern struct list_head dfu_list; #ifdef CONFIG_SET_DFU_ALT_INFO -- cgit v1.3.1 From ddf050a5d6e86fc2c8c4ea9bd47915ed340e412f Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:15 -0600 Subject: include/dw_hdmi.h: Audit include list This file does not need so remove it. Signed-off-by: Tom Rini --- include/dw_hdmi.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include') diff --git a/include/dw_hdmi.h b/include/dw_hdmi.h index b73518207ef..fab5aafea19 100644 --- a/include/dw_hdmi.h +++ b/include/dw_hdmi.h @@ -9,8 +9,6 @@ #ifndef _DW_HDMI_H #define _DW_HDMI_H -#include - #define HDMI_EDID_BLOCK_SIZE 128 /* Identification Registers */ -- cgit v1.3.1 From 8f3c64a53535b6bcc7b63a6cf9531a6dfddff5f3 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:16 -0600 Subject: include/dwmmc.h: Audit include list This file does not need so remove it. Signed-off-by: Tom Rini --- include/dwmmc.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/dwmmc.h b/include/dwmmc.h index 6edb9e1a59c..87ca127cd6c 100644 --- a/include/dwmmc.h +++ b/include/dwmmc.h @@ -7,7 +7,6 @@ #ifndef __DWMMC_HW_H #define __DWMMC_HW_H -#include #include #include #include -- cgit v1.3.1 From 40d5f553316eba90a893a58c12c098da74dca335 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:17 -0600 Subject: include/efi_loader.h, include/efi_tcg2.h: Audit include list In include/efi_loader.h we do not directly need , , nor so remove them. In include/efi_tcg2.h we make use of but did not include it, so add it directly. Reviewed-by: Ilias Apalodimas Tested-by: Ilias Apalodimas Signed-off-by: Tom Rini --- include/efi_loader.h | 4 ---- include/efi_tcg2.h | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'include') diff --git a/include/efi_loader.h b/include/efi_loader.h index 84e8cfe320e..f3c85ae8d66 100644 --- a/include/efi_loader.h +++ b/include/efi_loader.h @@ -10,15 +10,11 @@ #include #include -#include -#include #include #include -#include #include #include #include -#include struct blk_desc; struct bootflow; diff --git a/include/efi_tcg2.h b/include/efi_tcg2.h index 7ed88809913..34a3d4a0434 100644 --- a/include/efi_tcg2.h +++ b/include/efi_tcg2.h @@ -17,6 +17,7 @@ #define _EFI_TCG2_PROTOCOL_H_ #include +#include #include #include -- cgit v1.3.1 From 43d76dc7df600b10cbf70753750bf87de098b210 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:18 -0600 Subject: include/fat.h: Audit include list This file does not need so remove it. However the file common/spl/spl_fat.c does need it, so add it there. Signed-off-by: Tom Rini --- common/spl/spl_fat.c | 1 + include/fat.h | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/common/spl/spl_fat.c b/common/spl/spl_fat.c index f426a068ff9..8b7cafa7291 100644 --- a/common/spl/spl_fat.c +++ b/common/spl/spl_fat.c @@ -16,6 +16,7 @@ #include #include #include +#include static int fat_registered; diff --git a/include/fat.h b/include/fat.h index ca97880de12..bdf430f7067 100644 --- a/include/fat.h +++ b/include/fat.h @@ -11,7 +11,6 @@ #include #include -#include struct disk_partition; -- cgit v1.3.1 From d81b57a3cc881569d18014c0a8806e163066fd77 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:19 -0600 Subject: include/ide.h: Cleanup usage At this point in time, provides the IDE_BUS macro and the function prototype for ide_set_reset, which is used with IDE_RESET. The only files which should include this header are the ones that either use that macro or that function. Remove from and remove from places which do not need it. Signed-off-by: Tom Rini --- board/freescale/m5253demo/m5253demo.c | 1 + board/imgtec/malta/malta.c | 1 - cmd/ide.c | 1 - common/board_r.c | 1 - disk/part.c | 1 - disk/part_amiga.c | 1 - disk/part_dos.c | 1 - disk/part_efi.c | 1 - disk/part_mac.c | 1 - include/ide.h | 2 -- include/part.h | 1 - lib/efi_loader/efi_device_path.c | 1 + 12 files changed, 2 insertions(+), 11 deletions(-) (limited to 'include') diff --git a/board/freescale/m5253demo/m5253demo.c b/board/freescale/m5253demo/m5253demo.c index 446a79e6723..50c5320b55c 100644 --- a/board/freescale/m5253demo/m5253demo.c +++ b/board/freescale/m5253demo/m5253demo.c @@ -93,6 +93,7 @@ int testdram(void) #ifdef CONFIG_IDE #include +#include void ide_set_reset(int idereset) { atac_t *ata = (atac_t *) CONFIG_SYS_ATA_BASE_ADDR; diff --git a/board/imgtec/malta/malta.c b/board/imgtec/malta/malta.c index 4a72ab5ceca..0ffa964178f 100644 --- a/board/imgtec/malta/malta.c +++ b/board/imgtec/malta/malta.c @@ -6,7 +6,6 @@ #include #include -#include #include #include #include diff --git a/cmd/ide.c b/cmd/ide.c index 036489fda97..ed30f946866 100644 --- a/cmd/ide.c +++ b/cmd/ide.c @@ -19,7 +19,6 @@ #include #include -#include #include #ifdef CONFIG_LED_STATUS diff --git a/common/board_r.c b/common/board_r.c index b90a4d9ff69..a1183f0811d 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/disk/part.c b/disk/part.c index 303178161c0..9cbd03686f5 100644 --- a/disk/part.c +++ b/disk/part.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/disk/part_amiga.c b/disk/part_amiga.c index 5b8ae5762d3..22bf99f1b88 100644 --- a/disk/part_amiga.c +++ b/disk/part_amiga.c @@ -6,7 +6,6 @@ */ #include #include -#include #include "part_amiga.h" #include #include diff --git a/disk/part_dos.c b/disk/part_dos.c index 96f748702fd..5c77225cef9 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -15,7 +15,6 @@ #include #include -#include #include #include #include diff --git a/disk/part_efi.c b/disk/part_efi.c index 932d058c184..68ba1d11e7b 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include diff --git a/disk/part_mac.c b/disk/part_mac.c index 21c85942fd8..dd3ce0be832 100644 --- a/disk/part_mac.c +++ b/disk/part_mac.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "part_mac.h" #include diff --git a/include/ide.h b/include/ide.h index 2c25e74ede0..550b3305621 100644 --- a/include/ide.h +++ b/include/ide.h @@ -7,8 +7,6 @@ #ifndef _IDE_H #define _IDE_H -#include - #define IDE_BUS(dev) (dev / (CONFIG_SYS_IDE_MAXDEVICE / CONFIG_SYS_IDE_MAXBUS)) /** diff --git a/include/part.h b/include/part.h index fcb3c13dea4..3fa2d8424b7 100644 --- a/include/part.h +++ b/include/part.h @@ -7,7 +7,6 @@ #define _PART_H #include -#include #include #include #include diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c index c9bf2726fe2..66a951a8c1b 100644 --- a/lib/efi_loader/efi_device_path.c +++ b/lib/efi_loader/efi_device_path.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include -- cgit v1.3.1 From 2cf46de9b6b8463033ba4f9243643d004dc9ea5a Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:20 -0600 Subject: include/mmc.h: Audit include list This file does not need nor so remove them. This exposes however that a number of other files had been relying on this implicit include for so add that where needed. Signed-off-by: Tom Rini --- arch/powerpc/cpu/mpc85xx/fdt.c | 1 + board/emulation/common/qemu_dfu.c | 1 + board/toradex/verdin-am62/verdin-am62.c | 1 + drivers/mmc/mmc.c | 1 + drivers/mmc/snps_sdhci.c | 1 + include/mmc.h | 2 -- 6 files changed, 5 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index b2c0c517e7a..143b7c624d2 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/board/emulation/common/qemu_dfu.c b/board/emulation/common/qemu_dfu.c index 393fcaeb742..8a59f5ade13 100644 --- a/board/emulation/common/qemu_dfu.c +++ b/board/emulation/common/qemu_dfu.c @@ -7,6 +7,7 @@ #include #include #include +#include #define DFU_ALT_BUF_LEN SZ_1K diff --git a/board/toradex/verdin-am62/verdin-am62.c b/board/toradex/verdin-am62/verdin-am62.c index 7b2eecbf659..eca2cc8bc7f 100644 --- a/board/toradex/verdin-am62/verdin-am62.c +++ b/board/toradex/verdin-am62/verdin-am62.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include "../common/tdx-cfg-block.h" diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index cdcf2e0c8fe..9421a846e45 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mmc/snps_sdhci.c b/drivers/mmc/snps_sdhci.c index f5ede38c3c1..fe834ec2969 100644 --- a/drivers/mmc/snps_sdhci.c +++ b/drivers/mmc/snps_sdhci.c @@ -6,6 +6,7 @@ #include #include #include +#include #include /* DWCMSHC specific Mode Select value */ diff --git a/include/mmc.h b/include/mmc.h index eead666ae44..87f7ef131b6 100644 --- a/include/mmc.h +++ b/include/mmc.h @@ -11,8 +11,6 @@ #include #include -#include -#include #include #include #include -- cgit v1.3.1 From 2266595bf893edb07331ca8464738e0d4c82c129 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Wed, 21 May 2025 16:51:21 -0600 Subject: include/mtd.h: Cleanup usage There are only a few things found in today. Go through and audit the C files which include and remove it when not required. Then, add it to the files which had either missed it or had an indirect inclusion of it. Signed-off-by: Tom Rini --- arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c | 1 + board/bosch/guardian/board.c | 1 - board/dhelectronics/dh_stm32mp1/board.c | 1 - board/isee/igep00x0/igep00x0.c | 1 + board/xilinx/zynqmp/zynqmp.c | 1 + cmd/legacy-mtd-utils.c | 1 - cmd/mtdparts.c | 1 + drivers/fwu-mdata/raw_mtd.c | 1 + drivers/mtd/altera_qspi.c | 2 +- drivers/mtd/renesas_rpc_hf.c | 1 - include/fwu.h | 1 - lib/fwu_updates/fwu_v1.c | 1 + lib/fwu_updates/fwu_v2.c | 1 + 13 files changed, 8 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c index 5b027fad048..9acbc0689a9 100644 --- a/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c +++ b/arch/arm/mach-stm32mp/cmd_stm32prog/stm32prog.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/board/bosch/guardian/board.c b/board/bosch/guardian/board.c index 33ba7a7751c..ebbae27c0f9 100644 --- a/board/bosch/guardian/board.c +++ b/board/bosch/guardian/board.c @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include diff --git a/board/dhelectronics/dh_stm32mp1/board.c b/board/dhelectronics/dh_stm32mp1/board.c index d30171f1fbe..f7347bbb826 100644 --- a/board/dhelectronics/dh_stm32mp1/board.c +++ b/board/dhelectronics/dh_stm32mp1/board.c @@ -27,7 +27,6 @@ #include #include #include -#include #include #include #include diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c index a35a7cd3b1f..c21b083b62a 100644 --- a/board/isee/igep00x0/igep00x0.c +++ b/board/isee/igep00x0/igep00x0.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 735ef3cd1be..789b945d462 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/legacy-mtd-utils.c b/cmd/legacy-mtd-utils.c index 1a5271000bf..34a6da01947 100644 --- a/cmd/legacy-mtd-utils.c +++ b/cmd/legacy-mtd-utils.c @@ -4,7 +4,6 @@ #include #include #include -#include static int get_part(const char *partname, int *idx, loff_t *off, loff_t *size, loff_t *maxsize, int devtype) diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c index a021b2d198d..571b79f091d 100644 --- a/cmd/mtdparts.c +++ b/cmd/mtdparts.c @@ -74,6 +74,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/fwu-mdata/raw_mtd.c b/drivers/fwu-mdata/raw_mtd.c index 78a709f766c..41c153038ab 100644 --- a/drivers/fwu-mdata/raw_mtd.c +++ b/drivers/fwu-mdata/raw_mtd.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include diff --git a/drivers/mtd/altera_qspi.c b/drivers/mtd/altera_qspi.c index e5c8df750b7..46174aab349 100644 --- a/drivers/mtd/altera_qspi.c +++ b/drivers/mtd/altera_qspi.c @@ -9,10 +9,10 @@ #include #include #include -#include #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/drivers/mtd/renesas_rpc_hf.c b/drivers/mtd/renesas_rpc_hf.c index 50a6191d9c2..9390c9e9ab3 100644 --- a/drivers/mtd/renesas_rpc_hf.c +++ b/drivers/mtd/renesas_rpc_hf.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include diff --git a/include/fwu.h b/include/fwu.h index 6441de370c9..77e60167fc7 100644 --- a/include/fwu.h +++ b/include/fwu.h @@ -9,7 +9,6 @@ #include #include #include -#include #include #include diff --git a/lib/fwu_updates/fwu_v1.c b/lib/fwu_updates/fwu_v1.c index c311a8857a6..974abf216f6 100644 --- a/lib/fwu_updates/fwu_v1.c +++ b/lib/fwu_updates/fwu_v1.c @@ -3,6 +3,7 @@ * Copyright (c) 2024, Linaro Limited */ +#include #include #include diff --git a/lib/fwu_updates/fwu_v2.c b/lib/fwu_updates/fwu_v2.c index ce46904ff2e..159315b45b9 100644 --- a/lib/fwu_updates/fwu_v2.c +++ b/lib/fwu_updates/fwu_v2.c @@ -3,6 +3,7 @@ * Copyright (c) 2024, Linaro Limited */ +#include #include #include #include -- cgit v1.3.1