global: Remove duplicate common.h inclusions
Subsystems (22)
PATCH 1/11 global: Remove duplicate common.h inclusions
These files include <common.h> twice. Start by removing the second inclusion of the file.
--- board/data_modul/common/common.c | 1 - board/grinn/liteboard/board.c | 1 - board/toradex/colibri_imx7/colibri_imx7.c | 1 - board/wandboard/wandboard.c | 1 - drivers/gpio/gpio-aspeed.c | 1 - drivers/spi/fsl_dspi.c | 1 - drivers/video/exynos/exynos_dp.c | 1 - 7 files changed, 7 deletions(-)
board/data_modul/common/common.c +0 -1
@@ -12,7 +12,6 @@#include <asm/io.h> #include <asm/mach-imx/boot_mode.h> #include <asm/mach-imx/iomux-v3.h> -#include <common.h> #include <dm/uclass.h> #include <hang.h> #include <i2c_eeprom.h>
board/grinn/liteboard/board.c +0 -1
@@ -20,7 +20,6 @@#include <asm/mach-imx/iomux-v3.h> #include <asm/mach-imx/boot_mode.h> #include <asm/io.h> -#include <common.h> #include <env.h> #include <fsl_esdhc_imx.h> #include <linux/sizes.h>
board/toradex/colibri_imx7/colibri_imx7.c +0 -1
@@ -16,7 +16,6 @@#include <asm/gpio.h> #include <asm/mach-imx/iomux-v3.h> #include <asm/io.h> -#include <common.h> #include <dm.h> #include <dm/platform_data/serial_mxc.h> #include <fdt_support.h>
board/wandboard/wandboard.c +0 -1
@@ -28,7 +28,6 @@#include <env.h> #include <linux/delay.h> #include <linux/sizes.h> -#include <common.h> #include <miiphy.h> #include <netdev.h> #include <phy.h>
drivers/gpio/gpio-aspeed.c +0 -1
@@ -11,7 +11,6 @@#include <asm/gpio.h> #include <config.h> -#include <common.h> #include <clk.h> #include <dm.h> #include <asm/io.h>
drivers/spi/fsl_dspi.c +0 -1
@@ -14,7 +14,6 @@#include <common.h> #include <dm.h> #include <errno.h> -#include <common.h> #include <log.h> #include <spi.h> #include <malloc.h>
drivers/video/exynos/exynos_dp.c +0 -1
@@ -7,7 +7,6 @@#include <common.h> #include <dm.h> -#include <common.h> #include <display.h> #include <fdtdec.h> #include <log.h>
Signature · 1 line
2.34.1
PATCH 2/11 arm: Remove <asm/types.h> from asm/global_data.h
We need and include <linux/types.h> and this in turn already includes <asm/types.h>, so drop it here.
--- arch/arm/include/asm/global_data.h | 1 - 1 file changed, 1 deletion(-)
arch/arm/include/asm/global_data.h +0 -1
@@ -11,7 +11,6 @@#include <config.h> -#include <asm/types.h> #include <linux/types.h> /* Architecture-specific global data */
Signature · 1 line
2.34.1
Re: [PATCH 02/11] arm: Remove <asm/types.h> from asm/global_data.h
Quoted 8 lines · Tom Rini
We need and include <
linux/types.h> and this in turn already includes <asm/types.h>, so drop it here.Signed-off-by Tom Rini <[email protected]>--- arch/arm/include/asm/global_data.h | 1 - 1 file changed, 1 deletion(-)
PATCH 3/11 sandbox: Add <linux/types.h> to asm/global_data.h and asm/io.h
In reply to Tom RiniWe need <linux/types.h> in these files as we reference Linux types.
---
Cc: Simon Glass <[email protected]>
--- arch/sandbox/include/asm/global_data.h | 2 ++ arch/sandbox/include/asm/io.h | 2 ++ 2 files changed, 4 insertions(+)
arch/sandbox/include/asm/global_data.h +2 -0
@@ -9,6 +9,8 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H +#include <linux/types.h> + /* Architecture-specific global data */ struct arch_global_data { uint8_t *ram_buf; /* emulated RAM buffer */
arch/sandbox/include/asm/io.h +2 -0
@@ -6,6 +6,8 @@#ifndef __SANDBOX_ASM_IO_H#define __SANDBOX_ASM_IO_H +#include <linux/types.h> +enum sandboxio_size_t {SB_SIZE_8 , SB_SIZE_16,
Signature · 1 line
2.34.1
Re: [PATCH 03/11] sandbox: Add <linux/types.h> to asm/global_data.h and asm/io.h
Quoted 10 lines · Tom Rini
We need <
linux/types.h> in these files as we reference Linux types.Signed-off-by Tom Rini <[email protected]>---
Cc: Simon Glass <[email protected]>--- arch/sandbox/include/asm/global_data.h | 2 ++ arch/sandbox/include/asm/io.h | 2 ++ 2 files changed, 4 insertions(+)
PATCH 4/11 m68k: Rework asm/global_data.h slightly
In reply to Tom RiniIn the architecture global data, replace the one case of u32 with unsigned long. Now, we can drop config.h here but then do need to add it in two m68k-centric spaces.
---
Cc: Huan Wang <[email protected]>
Cc: Angelo Dureghello <[email protected]>
--- arch/m68k/include/asm/cache.h | 2 ++ arch/m68k/include/asm/global_data.h | 4 +--- arch/m68k/lib/traps.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)
arch/m68k/include/asm/cache.h +2 -0
@@ -9,6 +9,8 @@#ifndef __CACHE_H#define __CACHE_H +#include <config.h> +#if defined(CONFIG_MCF520x) || defined(CONFIG_MCF523x) || \ defined(CONFIG_MCF52x2)#define CFG_CF_V2
arch/m68k/include/asm/global_data.h +1 -3
@@ -7,8 +7,6 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H -#include <config.h> - /* Architecture-specific global data */ struct arch_global_data { #ifdef CONFIG_SYS_I2C_FSL
@@ -24,7 +22,7 @@ struct arch_global_data {unsigned long sdhc_clk;#endif #if defined(CONFIG_FSL_ESDHC ) -u32 sdhc_per_clk; +unsigned long sdhc_per_clk;#endif };
arch/m68k/lib/traps.c +1 -0
@@ -7,6 +7,7 @@* Wolfgang Denk, DENX Software Engineering, [email protected]. */ +#include <config.h> #include <init.h> #include <watchdog.h> #include <command.h>
Signature · 1 line
2.34.1
Re: [PATCH 04/11] m68k: Rework asm/global_data.h slightly
Hi Tom,
thanks,
Quoted 54 lines · Tom Rini
In the architecture global data, replace the one case of u32 with unsigned long. Now, we can drop
config.hhere but then do need to add it in two m68k-centric spaces.Signed-off-by Tom Rini <[email protected]>---
Cc: Huan Wang <[email protected]>
Cc: Angelo Dureghello <[email protected]>--- arch/m68k/include/asm/cache.h | 2 ++ arch/m68k/include/asm/global_data.h | 4 +--- arch/m68k/lib/traps.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)arch/m68k/include/asm/cache.h +2
-0@@ -9,6 +9,8 @@#ifndef __CACHE_H#define __CACHE_H +#include <config.h> +#if defined(CONFIG_MCF520x) || defined(CONFIG_MCF523x) || \ defined(CONFIG_MCF52x2)#define CFG_CF_V2 arch/m68k/include/asm/global_data.h +1
-3@@ -7,8 +7,6 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H -#include <config.h> - /* Architecture-specific global data */ struct arch_global_data { #ifdef CONFIG_SYS_I2C_FSL@@ -24,7 +22,7 @@ struct arch_global_data {unsigned long sdhc_clk;#endif #if defined(CONFIG_FSL_ESDHC ) -u32 sdhc_per_clk; +unsigned long sdhc_per_clk;#endif };arch/m68k/lib/traps.c +0
-0
arch/m68k/lib/traps.c line 13
Quoted 7 lines
arch/m68k/lib/traps.c +1
-0@@ -7,6 +7,7 @@* Wolfgang Denk, DENX Software Engineering, [email protected]. */ +#include <config.h> #include <init.h> #include <watchdog.h> #include <command.h>
testing this getting some errors
+drivers/watchdog/mcf_wdt.c: In function 'mcf_watchdog_init':+drivers/watchdog/mcf_wdt.c:43:26: error: 'CFG_SYS_CLK' undeclared (first use in this function)
+ 43 | cycles_per_sec = CFG_SYS_CLK / fixed_divider;
+ | ^~~~~~~~~~~
Seems solved by
drivers/watchdog/mcf_wdt.c +1 -0
@@ -11,6 +11,7 @@#include <asm/io.h> #include <wdt.h> #include <linux/bitops.h> +#include <config.h>
Regards,
angelo
Re: [PATCH 04/11] m68k: Rework asm/global_data.h slightly
Quoted 80 lines · Angelo Dureghello
Hi Tom,
thanks,
Quoted 51 lines · Tom Rini
In the architecture global data, replace the one case of u32 with unsigned long. Now, we can drop
config.hhere but then do need to add it in two m68k-centric spaces.Signed-off-by Tom Rini <[email protected]>---
Cc: Huan Wang <[email protected]>
Cc: Angelo Dureghello <[email protected]>--- arch/m68k/include/asm/cache.h | 2 ++ arch/m68k/include/asm/global_data.h | 4 +--- arch/m68k/lib/traps.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)arch/m68k/include/asm/cache.h +2
-0@@ -9,6 +9,8 @@#ifndef __CACHE_H#define __CACHE_H +#include <config.h> +#if defined(CONFIG_MCF520x) || defined(CONFIG_MCF523x) || \ defined(CONFIG_MCF52x2)#define CFG_CF_V2 arch/m68k/include/asm/global_data.h +1
-3@@ -7,8 +7,6 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H -#include <config.h> - /* Architecture-specific global data */ struct arch_global_data { #ifdef CONFIG_SYS_I2C_FSL@@ -24,7 +22,7 @@ struct arch_global_data {unsigned long sdhc_clk;#endif #if defined(CONFIG_FSL_ESDHC ) -u32 sdhc_per_clk; +unsigned long sdhc_per_clk;#endif };arch/m68k/lib/traps.c +0
-0arch/m68k/lib/traps.c line 12
Quoted 6 lines
arch/m68k/lib/traps.c +1
-0@@ -7,6 +7,7 @@* Wolfgang Denk, DENX Software Engineering, [email protected]. */ +#include <config.h> #include <init.h> #include <watchdog.h> #include <command.h> testing this getting some errors
(quoted diff) +2
-0+drivers/watchdog/mcf_wdt.c: In function 'mcf_watchdog_init': +drivers/watchdog/mcf_wdt.c:43:26: error: 'CFG_SYS_CLK' undeclared (firstuse in this function)
(quoted diff) +2
-0+ 43 | cycles_per_sec = CFG_SYS_CLK / fixed_divider; + | ^~~~~~~~~~~Seems solved by
drivers/watchdog/mcf_wdt.c +0
-0
drivers/watchdog/mcf_wdt.c line 14
Quoted 4 lines
drivers/watchdog/mcf_wdt.c +1
-0@@ -11,6 +11,7 @@#include <asm/io.h> #include <wdt.h> #include <linux/bitops.h> +#include <config.h>
Did you have the whole series applied? That is a reasonable solution, but I didn't see a failure here, thanks for the report.
Signature · 1 line
Tom
Angelo Dureghello
Acked-byRe: [PATCH 04/11] m68k: Rework asm/global_data.h slightly
Hi Tom,
sorry, i have difficulties to get the full patchset, was also looking into patchwork, but seems not updated.
Anyway, i applied patches one by one, all is ok.
Quoted 89 lines · Tom Rini
Quoted 80 lines · Angelo Dureghello
Hi Tom,
thanks,
Quoted 51 lines · Tom Rini
In the architecture global data, replace the one case of u32 with unsigned long. Now, we can drop
config.hhere but then do need to add it in two m68k-centric spaces.Signed-off-by Tom Rini <[email protected]>---
Cc: Huan Wang <[email protected]>
Cc: Angelo Dureghello <[email protected]>--- arch/m68k/include/asm/cache.h | 2 ++ arch/m68k/include/asm/global_data.h | 4 +--- arch/m68k/lib/traps.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-)arch/m68k/include/asm/cache.h +2
-0@@ -9,6 +9,8 @@#ifndef __CACHE_H#define __CACHE_H +#include <config.h> +#if defined(CONFIG_MCF520x) || defined(CONFIG_MCF523x) || \ defined(CONFIG_MCF52x2)#define CFG_CF_V2 arch/m68k/include/asm/global_data.h +1
-3@@ -7,8 +7,6 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H -#include <config.h> - /* Architecture-specific global data */ struct arch_global_data { #ifdef CONFIG_SYS_I2C_FSL@@ -24,7 +22,7 @@ struct arch_global_data {unsigned long sdhc_clk;#endif #if defined(CONFIG_FSL_ESDHC ) -u32 sdhc_per_clk; +unsigned long sdhc_per_clk;#endif };arch/m68k/lib/traps.c +0
-0arch/m68k/lib/traps.c line 12
Quoted 6 lines
arch/m68k/lib/traps.c +1
-0@@ -7,6 +7,7 @@* Wolfgang Denk, DENX Software Engineering, [email protected]. */ +#include <config.h> #include <init.h> #include <watchdog.h> #include <command.h> testing this getting some errors
(quoted diff) +2
-0+drivers/watchdog/mcf_wdt.c: In function 'mcf_watchdog_init': +drivers/watchdog/mcf_wdt.c:43:26: error: 'CFG_SYS_CLK' undeclared (firstuse in this function)
(quoted diff) +2
-0+ 43 | cycles_per_sec = CFG_SYS_CLK / fixed_divider; + | ^~~~~~~~~~~Seems solved by
drivers/watchdog/mcf_wdt.c +0
-0drivers/watchdog/mcf_wdt.c line 14
Quoted 4 lines
drivers/watchdog/mcf_wdt.c +1
-0@@ -11,6 +11,7 @@#include <asm/io.h> #include <wdt.h> #include <linux/bitops.h> +#include <config.h> Did you have the whole series applied? That is a reasonable solution, but I didn't see a failure here, thanks for the report.
PATCH 5/11 global: Rework architecture global_data.h to include <linux/types.h>
In reply to Tom RiniIn most cases, the architecture global data currently makes use of assorted linux types, but does not include <linux/types.h> to provide them. Add <linux/types.h> instead of relying on indirect inclusion.
--- arch/mips/include/asm/global_data.h | 2 +- arch/nios2/include/asm/global_data.h | 2 ++ arch/powerpc/include/asm/global_data.h | 3 +-- arch/riscv/include/asm/global_data.h | 1 + arch/x86/include/asm/global_data.h | 1 + 5 files changed, 6 insertions(+), 3 deletions(-)
arch/mips/include/asm/global_data.h +1 -1
@@ -7,8 +7,8 @@ #ifndef __ASM_GBL_DATA_H #define __ASM_GBL_DATA_H +#include <linux/types.h> #include <asm/regdef.h> -#include <asm/types.h> struct octeon_eeprom_mac_addr { u8 mac_addr_base[6];
arch/nios2/include/asm/global_data.h +2 -0
@@ -6,6 +6,8 @@ #ifndef __ASM_NIOS2_GLOBALDATA_H_ #define __ASM_NIOS2_GLOBALDATA_H_ +#include <linux/types.h> + /* Architecture-specific global data */ struct arch_global_data { u32 dcache_line_size;
arch/powerpc/include/asm/global_data.h +1 -2
@@ -8,8 +8,7 @@#ifndef __ASM_GBL_DATA_H#define __ASM_GBL_DATA_H -#include <config.h> -#include "asm/types.h" +#include <linux/types.h> /* Architecture-specific global data */ struct arch_global_data {
arch/riscv/include/asm/global_data.h +1 -0
@@ -10,6 +10,7 @@#ifndef __ASM_GBL_DATA_H#define __ASM_GBL_DATA_H +#include <linux/types.h> #include <asm/smp.h> #include <asm/u-boot.h> #include <compiler.h>
arch/x86/include/asm/global_data.h +1 -0
@@ -9,6 +9,7 @@#ifndef __ASSEMBLY__ +#include <linux/types.h> #include <asm/processor.h> #include <asm/mrccache.h>
Signature · 1 line
2.34.1
Re: [PATCH 05/11] global: Rework architecture global_data.h to include <linux/types.h>
Quoted 5 lines · Tom Rini
In most cases, the architecture global data currently makes use of assorted linux types, but does not include <
linux/types.h> to provide them. Add <linux/types.h> instead of relying on indirect inclusion.
Quoted 9 lines
Signed-off-by Tom Rini <[email protected]>--- arch/mips/include/asm/global_data.h | 2 +- arch/nios2/include/asm/global_data.h | 2 ++ arch/powerpc/include/asm/global_data.h | 3 +-- arch/riscv/include/asm/global_data.h | 1 + arch/x86/include/asm/global_data.h | 1 + 5 files changed, 6 insertions(+), 3 deletions(-)
PATCH 6/11 lib/sha*.c: Update header list
In reply to Tom RiniCleanup the list of headers we include here. For the tools build we only need to exclude <cyclic.h> as that's used by the target build for the prototype for schedule(), and we don't need to get that via <watchdog.h>. We can also make use of our <string.h> intentionally existing as a redirection to <linux/string.h> to reduce ifdef'd lines.
--- lib/sha1.c | 7 ++----- lib/sha256.c | 7 ++----- lib/sha512.c | 6 +----- 3 files changed, 5 insertions(+), 15 deletions(-)
lib/sha1.c +2 -5
@@ -17,12 +17,9 @@#endif #ifndef USE_HOSTCC -#include <common.h> -#include <linux/string.h> -#else -#include <string.h> +#include <cyclic.h> #endif /* USE_HOSTCC */ -#include <watchdog.h> +#include <string.h> #include <u-boot/sha1.h> #include <linux/compiler_attributes.h>
lib/sha256.c +2 -5
@@ -6,12 +6,9 @@*/ #ifndef USE_HOSTCC -#include <common.h> -#include <linux/string.h> -#else -#include <string.h> +#include <cyclic.h> #endif /* USE_HOSTCC */ -#include <watchdog.h> +#include <string.h> #include <u-boot/sha256.h> #include <linux/compiler_attributes.h>
lib/sha512.c +1 -5
@@ -11,13 +11,9 @@*/ #ifndef USE_HOSTCC -#include <common.h> -#include <linux/string.h> -#else -#include <string.h> +#include <cyclic.h> #endif /* USE_HOSTCC */ #include <compiler.h> -#include <watchdog.h> #include <u-boot/sha512.h> const uint8_t sha384_der_prefix[SHA384_DER_LEN ] = {
Signature · 1 line
2.34.1
Re: [PATCH 06/11] lib/sha*.c: Update header list
Hi Tom,
Quoted 7 lines · Tom Rini
Cleanup the list of headers we include here. For the tools build we only need to exclude <
cyclic.h> as that's used by the target build for the prototype forschedule(), and we don't need to get that via <watchdog.h>. We can also make use of our <string.h> intentionally existing as a redirection to <linux/string.h> to reduce ifdef'd lines.
Quoted 6 lines
Signed-off-by Tom Rini <[email protected]>--- lib/sha1.c | 7 ++----- lib/sha256.c | 7 ++----- lib/sha512.c | 6 +----- 3 files changed, 5 insertions(+), 15 deletions(-)
As mentioned in my series this will prevent dropping the #ifdefs in this file:
#if defined(CONFIG_HW_WATCHDOG) || defined(CONFIG_WATCHDOG)
Actually I see that I didn't send the v2 so I just did that now[1].
Regards,
Simon
[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Re: [PATCH 06/11] lib/sha*.c: Update header list
Quoted 19 lines · Simon Glass
Hi Tom,
Quoted 7 lines · Tom Rini
Cleanup the list of headers we include here. For the tools build we only need to exclude <
cyclic.h> as that's used by the target build for the prototype forschedule(), and we don't need to get that via <watchdog.h>. We can also make use of our <string.h> intentionally existing as a redirection to <linux/string.h> to reduce ifdef'd lines.Quoted 6 lines
Signed-off-by Tom Rini <[email protected]>--- lib/sha1.c | 7 ++----- lib/sha256.c | 7 ++----- lib/sha512.c | 6 +----- 3 files changed, 5 insertions(+), 15 deletions(-)As mentioned in my series this will prevent dropping the #ifdefs in this file:
Quoted 8 lines
#if
defined(CONFIG_HW_WATCHDOG)||defined(CONFIG_WATCHDOG)Actually I see that I didn't send the v2 so I just did that now[1].
Regards,
Simon[1] https://patchwork.ozlabs.org/project/uboot/patch/[email protected]/
Yes, I prefer what I did here instead of [1].
Signature · 1 line
Tom
PATCH 7/11 rmobile: Add <mach/rmobile.h> to cpu_info-rzg2l.c
In reply to Tom RiniIn order for RMOBILE_CPU_TYPE_R9A07G044L to be defined we need to include <mach/rmobile.h> here.
---
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Paul Barker <[email protected]>
--- arch/arm/mach-rmobile/cpu_info-rzg2l.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-rmobile/cpu_info-rzg2l.c +1 -0
@@ -4,6 +4,7 @@* */ +#include <mach/rmobile.h> #include <asm/io.h> #include <linux/libfdt.h>
Signature · 1 line
2.34.1
Re: [PATCH 07/11] rmobile: Add <mach/rmobile.h> to cpu_info-rzg2l.c
Quoted 8 lines · Tom Rini
In order for
RMOBILE_CPU_TYPE_R9A07G044Lto be defined we need to include <mach/rmobile.h> here.Signed-off-by Tom Rini <[email protected]>---
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Paul Barker <[email protected]>
PATCH 8/11 efi_loader: Remove <common.h>
In reply to Tom RiniWe largely do not need <common.h> in these files, so drop it. The only exception here is that efi_freestanding.c needs <linux/types.h> and had been getting that via <common.h>.
---
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
--- include/efi_loader.h | 1 - lib/efi_loader/dtbdump.c | 1 - lib/efi_loader/efi_acpi.c | 1 - lib/efi_loader/efi_bootmgr.c | 1 - lib/efi_loader/efi_boottime.c | 1 - lib/efi_loader/efi_capsule.c | 1 - lib/efi_loader/efi_conformance.c | 1 - lib/efi_loader/efi_console.c | 1 - lib/efi_loader/efi_device_path.c | 1 - lib/efi_loader/efi_device_path_to_text.c | 1 - lib/efi_loader/efi_device_path_utilities.c | 1 - lib/efi_loader/efi_disk.c | 1 - lib/efi_loader/efi_dt_fixup.c | 1 - lib/efi_loader/efi_esrt.c | 1 - lib/efi_loader/efi_file.c | 1 - lib/efi_loader/efi_firmware.c | 1 - lib/efi_loader/efi_freestanding.c | 2 +- lib/efi_loader/efi_gop.c | 1 - lib/efi_loader/efi_helper.c | 1 - lib/efi_loader/efi_hii.c | 1 - lib/efi_loader/efi_hii_config.c | 1 - lib/efi_loader/efi_image_loader.c | 1 - lib/efi_loader/efi_load_initrd.c | 1 - lib/efi_loader/efi_load_options.c | 1 - lib/efi_loader/efi_memory.c | 1 - lib/efi_loader/efi_net.c | 1 - lib/efi_loader/efi_riscv.c | 1 - lib/efi_loader/efi_rng.c | 1 - lib/efi_loader/efi_root_node.c | 1 - lib/efi_loader/efi_runtime.c | 1 - lib/efi_loader/efi_setup.c | 1 - lib/efi_loader/efi_signature.c | 1 - lib/efi_loader/efi_smbios.c | 1 - lib/efi_loader/efi_string.c | 1 - lib/efi_loader/efi_tcg2.c | 1 - lib/efi_loader/efi_unicode_collation.c | 1 - lib/efi_loader/efi_var_common.c | 1 - lib/efi_loader/efi_var_file.c | 1 - lib/efi_loader/efi_var_mem.c | 1 - lib/efi_loader/efi_variable.c | 1 - lib/efi_loader/efi_variable_tee.c | 1 - lib/efi_loader/efi_watchdog.c | 1 - lib/efi_loader/initrddump.c | 1 - 43 files changed, 1 insertion(+), 43 deletions(-)
include/efi_loader.h +0 -1
@@ -8,7 +8,6 @@#ifndef _EFI_LOADER_H#define _EFI_LOADER_H 1 -#include <common.h> #include <blk.h> #include <event.h> #include <log.h>
lib/efi_loader/dtbdump.c +0 -1
@@ -6,7 +6,6 @@* to a file. */ -#include <common.h> #include <efi_api.h> #include <efi_dt_fixup.h> #include <part.h>
lib/efi_loader/efi_acpi.c +0 -1
@@ -5,7 +5,6 @@* Copyright (C) 2018, Bin Meng <[email protected]> */ -#include <common.h> #include <efi_loader.h> #include <log.h> #include <mapmem.h>
lib/efi_loader/efi_bootmgr.c +0 -1
@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <charset.h> #include <log.h> #include <malloc.h>
lib/efi_loader/efi_boottime.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2016 Alexander Graf */ -#include <common.h> #include <bootm.h> #include <div64.h> #include <dm/device.h>
lib/efi_loader/efi_capsule.c +0 -1
@@ -8,7 +8,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <env.h>
lib/efi_loader/efi_conformance.c +0 -1
@@ -5,7 +5,6 @@* Copyright (C) 2022 Arm Ltd. */ -#include <common.h> #include <efi_loader.h> #include <log.h> #include <efi_api.h>
lib/efi_loader/efi_console.c +0 -1
@@ -8,7 +8,6 @@#define LOG_CATEGORY LOGC_EFI#include <ansi.h> -#include <common.h> #include <charset.h> #include <malloc.h> #include <time.h>
lib/efi_loader/efi_device_path.c +0 -1
@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <blk.h> #include <dm.h> #include <dm/root.h>
lib/efi_loader/efi_device_path_to_text.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2017 Heinrich Schuchardt */ -#include <common.h> #include <blk.h> #include <efi_loader.h> #include <malloc.h>
lib/efi_loader/efi_device_path_utilities.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2017 Leif Lindholm */ -#include <common.h> #include <efi_loader.h> const efi_guid_t efi_guid_device_path_utilities_protocol =
lib/efi_loader/efi_disk.c +0 -1
@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <blk.h> #include <dm.h> #include <dm/device-internal.h>
lib/efi_loader/efi_dt_fixup.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2020 Heinrich Schuchardt */ -#include <common.h> #include <efi_dt_fixup.h> #include <efi_loader.h> #include <efi_rng.h>
lib/efi_loader/efi_esrt.c +0 -1
@@ -5,7 +5,6 @@* Copyright (C) 2021 Arm Ltd. */ -#include <common.h> #include <efi_loader.h> #include <log.h> #include <efi_api.h>
lib/efi_loader/efi_file.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2017 Rob Clark */ -#include <common.h> #include <charset.h> #include <efi_loader.h> #include <log.h>
lib/efi_loader/efi_firmware.c +0 -1
@@ -6,7 +6,6 @@* Author: AKASHI Takahiro */ -#include <common.h> #include <charset.h> #include <dfu.h> #include <efi_loader.h>
lib/efi_loader/efi_freestanding.c +1 -1
@@ -8,7 +8,7 @@* memset(), and memcmp(). */ -#include <common.h> +#include <linux/types.h> /** * memcmp() - compare memory areas
lib/efi_loader/efi_gop.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2016 Alexander Graf */ -#include <common.h> #include <dm.h> #include <efi_loader.h> #include <log.h>
lib/efi_loader/efi_helper.c +0 -1
@@ -4,7 +4,6 @@*/ #define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <env.h> #include <malloc.h> #include <dm.h>
lib/efi_loader/efi_hii.c +0 -1
@@ -6,7 +6,6 @@* Copyright (c) 2018 AKASHI Takahiro, Linaro Limited */ -#include <common.h> #include <efi_loader.h> #include <malloc.h> #include <asm/unaligned.h>
lib/efi_loader/efi_hii_config.c +0 -1
@@ -10,7 +10,6 @@* the Makefile. */ -#include <common.h> #include <efi_loader.h> const efi_guid_t efi_guid_hii_config_routing_protocol
lib/efi_loader/efi_image_loader.c +0 -1
@@ -9,7 +9,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <cpu_func.h> #include <efi_loader.h> #include <log.h>
lib/efi_loader/efi_load_initrd.c +0 -1
@@ -4,7 +4,6 @@*/ #define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_load_initrd.h> #include <efi_variable.h>
lib/efi_loader/efi_load_options.c +0 -1
@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <charset.h> #include <log.h> #include <malloc.h>
lib/efi_loader/efi_memory.c +0 -1
@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <init.h> #include <log.h>
lib/efi_loader/efi_net.c +0 -1
@@ -15,7 +15,6 @@* Reset(): EfiSimpleNetworkInitialized -> EfiSimpleNetworkInitialized */ -#include <common.h> #include <efi_loader.h> #include <malloc.h> #include <net.h>
lib/efi_loader/efi_riscv.c +0 -1
@@ -7,7 +7,6 @@*/ #define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <log.h>
lib/efi_loader/efi_rng.c +0 -1
@@ -5,7 +5,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <dm.h> #include <efi_loader.h> #include <efi_rng.h>
lib/efi_loader/efi_root_node.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2018 Heinrich Schuchardt */ -#include <common.h> #include <malloc.h> #include <efi_dt_fixup.h> #include <efi_loader.h>
lib/efi_loader/efi_runtime.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2016 Alexander Graf */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <dm.h>
lib/efi_loader/efi_setup.c +0 -1
@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <log.h>
lib/efi_loader/efi_signature.c +0 -1
@@ -4,7 +4,6 @@* Copyright (c) 2019 Linaro Limited, Author: AKASHI Takahiro */ -#include <common.h> #include <charset.h> #include <efi_loader.h> #include <efi_variable.h>
lib/efi_loader/efi_smbios.c +0 -1
@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <log.h> #include <malloc.h>
lib/efi_loader/efi_string.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2020 AKASHI Takahiro, Linaro Limited */ -#include <common.h> #include <charset.h> #include <efi_loader.h> #include <malloc.h>
lib/efi_loader/efi_tcg2.c +0 -1
@@ -8,7 +8,6 @@*/ #define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <dm.h> #include <efi_loader.h> #include <efi_variable.h>
lib/efi_loader/efi_unicode_collation.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2018 Heinrich Schuchardt <[email protected]> */ -#include <common.h> #include <charset.h> #include <cp1250.h> #include <cp437.h>
lib/efi_loader/efi_var_common.c +0 -1
@@ -6,7 +6,6 @@* Copyright (c) 2020 Linaro Limited, Author: AKASHI Takahiro */ -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <stdlib.h>
lib/efi_loader/efi_var_file.c +0 -1
@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <charset.h> #include <fs.h> #include <log.h>
lib/efi_loader/efi_var_mem.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2020, Heinrich Schuchardt */ -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <u-boot/crc.h>
lib/efi_loader/efi_variable.c +0 -1
@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <env.h>
lib/efi_loader/efi_variable_tee.c +0 -1
@@ -10,7 +10,6 @@* Abdellatif El Khlifi <[email protected]> */ -#include <common.h> #if CONFIG_IS_ENABLED (ARM_FFA_TRANSPORT )#include <arm_ffa.h> #endif
lib/efi_loader/efi_watchdog.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2017 Heinrich Schuchardt */ -#include <common.h> #include <efi_loader.h> /* Conversion factor from seconds to multiples of 100ns */
lib/efi_loader/initrddump.c +0 -1
@@ -9,7 +9,6 @@* clearing of the screen. */ -#include <common.h> #include <efi_api.h> #include <efi_load_initrd.h>
Signature · 1 line
2.34.1
Re: [PATCH 08/11] efi_loader: Remove <common.h>
Hi Tom,
Thanks for the cleanup
Quoted 45 lines · Tom Rini
We largely do not need <
common.h> in these files, so drop it. The only exception here is thatefi_freestanding.cneeds <linux/types.h> and had been getting that via <common.h>.Signed-off-by Tom Rini <[email protected]>---
Cc: Heinrich Schuchardt <[email protected]>
Cc: Ilias Apalodimas <[email protected]>--- include/efi_loader.h | 1 - lib/efi_loader/dtbdump.c | 1 - lib/efi_loader/efi_acpi.c | 1 - lib/efi_loader/efi_bootmgr.c | 1 - lib/efi_loader/efi_boottime.c | 1 - lib/efi_loader/efi_capsule.c | 1 - lib/efi_loader/efi_conformance.c | 1 - lib/efi_loader/efi_console.c | 1 - lib/efi_loader/efi_device_path.c | 1 - lib/efi_loader/efi_device_path_to_text.c | 1 - lib/efi_loader/efi_device_path_utilities.c | 1 - lib/efi_loader/efi_disk.c | 1 - lib/efi_loader/efi_dt_fixup.c | 1 - lib/efi_loader/efi_esrt.c | 1 - lib/efi_loader/efi_file.c | 1 - lib/efi_loader/efi_firmware.c | 1 - lib/efi_loader/efi_freestanding.c | 2 +- lib/efi_loader/efi_gop.c | 1 - lib/efi_loader/efi_helper.c | 1 - lib/efi_loader/efi_hii.c | 1 - lib/efi_loader/efi_hii_config.c | 1 - lib/efi_loader/efi_image_loader.c | 1 - lib/efi_loader/efi_load_initrd.c | 1 - lib/efi_loader/efi_load_options.c | 1 - lib/efi_loader/efi_memory.c | 1 - lib/efi_loader/efi_net.c | 1 - lib/efi_loader/efi_riscv.c | 1 - lib/efi_loader/efi_rng.c | 1 - lib/efi_loader/efi_root_node.c | 1 - lib/efi_loader/efi_runtime.c | 1 - lib/efi_loader/efi_setup.c | 1 - lib/efi_loader/efi_signature.c | 1 - lib/efi_loader/efi_smbios.c | 1 - lib/efi_loader/efi_string.c | 1 - lib/efi_loader/efi_tcg2.c | 1 - lib/efi_loader/efi_unicode_collation.c | 1 -
Quoted 9 lines
lib/efi_loader/efi_var_common.c | 1 - lib/efi_loader/efi_var_file.c | 1 - lib/efi_loader/efi_var_mem.c | 1 - lib/efi_loader/efi_variable.c | 1 - lib/efi_loader/efi_variable_tee.c | 1 - lib/efi_loader/efi_watchdog.c | 1 - lib/efi_loader/initrddump.c | 1 - 43 files changed, 1 insertion(+), 43 deletions(-)
Quoted 535 lines
include/efi_loader.h +0
-1@@ -8,7 +8,6 @@#ifndef _EFI_LOADER_H#define _EFI_LOADER_H 1 -#include <common.h> #include <blk.h> #include <event.h> #include <log.h> lib/efi_loader/dtbdump.c +0
-1@@ -6,7 +6,6 @@* to a file. */ -#include <common.h> #include <efi_api.h> #include <efi_dt_fixup.h> #include <part.h> lib/efi_loader/efi_acpi.c +0
-1@@ -5,7 +5,6 @@* Copyright (C) 2018, Bin Meng <[email protected]> */ -#include <common.h> #include <efi_loader.h> #include <log.h> #include <mapmem.h> lib/efi_loader/efi_bootmgr.c +0
-1@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <charset.h> #include <log.h> #include <malloc.h> lib/efi_loader/efi_boottime.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2016 Alexander Graf */ -#include <common.h> #include <bootm.h> #include <div64.h> #include <dm/device.h> lib/efi_loader/efi_capsule.c +0
-1@@ -8,7 +8,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <env.h> lib/efi_loader/efi_conformance.c +0
-1@@ -5,7 +5,6 @@* Copyright (C) 2022 Arm Ltd. */ -#include <common.h> #include <efi_loader.h> #include <log.h> #include <efi_api.h> lib/efi_loader/efi_console.c +0
-1@@ -8,7 +8,6 @@#define LOG_CATEGORY LOGC_EFI#include <ansi.h> -#include <common.h> #include <charset.h> #include <malloc.h> #include <time.h> lib/efi_loader/efi_device_path.c +0
-1@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <blk.h> #include <dm.h> #include <dm/root.h> lib/efi_loader/efi_device_path_to_text.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2017 Heinrich Schuchardt */ -#include <common.h> #include <blk.h> #include <efi_loader.h> #include <malloc.h> lib/efi_loader/efi_device_path_utilities.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2017 Leif Lindholm */ -#include <common.h> #include <efi_loader.h> const efi_guid_t efi_guid_device_path_utilities_protocol =lib/efi_loader/efi_disk.c +0
-1@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <blk.h> #include <dm.h> #include <dm/device-internal.h> lib/efi_loader/efi_dt_fixup.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2020 Heinrich Schuchardt */ -#include <common.h> #include <efi_dt_fixup.h> #include <efi_loader.h> #include <efi_rng.h> lib/efi_loader/efi_esrt.c +0
-1@@ -5,7 +5,6 @@* Copyright (C) 2021 Arm Ltd. */ -#include <common.h> #include <efi_loader.h> #include <log.h> #include <efi_api.h> lib/efi_loader/efi_file.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2017 Rob Clark */ -#include <common.h> #include <charset.h> #include <efi_loader.h> #include <log.h> lib/efi_loader/efi_firmware.c +0
-1@@ -6,7 +6,6 @@* Author: AKASHI Takahiro */ -#include <common.h> #include <charset.h> #include <dfu.h> #include <efi_loader.h> lib/efi_loader/efi_freestanding.c +1
-1@@ -8,7 +8,7 @@* memset(), and memcmp(). */ -#include <common.h> +#include <linux/types.h> /** * memcmp() - compare memory areas lib/efi_loader/efi_gop.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2016 Alexander Graf */ -#include <common.h> #include <dm.h> #include <efi_loader.h> #include <log.h> lib/efi_loader/efi_helper.c +0
-1@@ -4,7 +4,6 @@*/ #define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <env.h> #include <malloc.h> #include <dm.h> lib/efi_loader/efi_hii.c +0
-1@@ -6,7 +6,6 @@* Copyright (c) 2018 AKASHI Takahiro, Linaro Limited */ -#include <common.h> #include <efi_loader.h> #include <malloc.h> #include <asm/unaligned.h> lib/efi_loader/efi_hii_config.c +0
-1@@ -10,7 +10,6 @@* the Makefile. */ -#include <common.h> #include <efi_loader.h> const efi_guid_t efi_guid_hii_config_routing_protocollib/efi_loader/efi_image_loader.c +0
-1@@ -9,7 +9,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <cpu_func.h> #include <efi_loader.h> #include <log.h> lib/efi_loader/efi_load_initrd.c +0
-1@@ -4,7 +4,6 @@*/ #define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_load_initrd.h> #include <efi_variable.h> lib/efi_loader/efi_load_options.c +0
-1@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <charset.h> #include <log.h> #include <malloc.h> lib/efi_loader/efi_memory.c +0
-1@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <init.h> #include <log.h> lib/efi_loader/efi_net.c +0
-1@@ -15,7 +15,6 @@* Reset(): EfiSimpleNetworkInitialized -> EfiSimpleNetworkInitialized */ -#include <common.h> #include <efi_loader.h> #include <malloc.h> #include <net.h> lib/efi_loader/efi_riscv.c +0
-1@@ -7,7 +7,6 @@*/ #define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <log.h> lib/efi_loader/efi_rng.c +0
-1@@ -5,7 +5,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <dm.h> #include <efi_loader.h> #include <efi_rng.h> lib/efi_loader/efi_root_node.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2018 Heinrich Schuchardt */ -#include <common.h> #include <malloc.h> #include <efi_dt_fixup.h> #include <efi_loader.h> lib/efi_loader/efi_runtime.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2016 Alexander Graf */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <dm.h> lib/efi_loader/efi_setup.c +0
-1@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <log.h> lib/efi_loader/efi_signature.c +0
-1@@ -4,7 +4,6 @@* Copyright (c) 2019 Linaro Limited, Author: AKASHI Takahiro */ -#include <common.h> #include <charset.h> #include <efi_loader.h> #include <efi_variable.h> lib/efi_loader/efi_smbios.c +0
-1@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <log.h> #include <malloc.h> lib/efi_loader/efi_string.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2020 AKASHI Takahiro, Linaro Limited */ -#include <common.h> #include <charset.h> #include <efi_loader.h> #include <malloc.h> lib/efi_loader/efi_tcg2.c +0
-1@@ -8,7 +8,6 @@*/ #define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <dm.h> #include <efi_loader.h> #include <efi_variable.h> lib/efi_loader/efi_unicode_collation.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2018 Heinrich Schuchardt <[email protected]> */ -#include <common.h> #include <charset.h> #include <cp1250.h> #include <cp437.h> lib/efi_loader/efi_var_common.c +0
-1@@ -6,7 +6,6 @@* Copyright (c) 2020 Linaro Limited, Author: AKASHI Takahiro */ -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <stdlib.h> lib/efi_loader/efi_var_file.c +0
-1@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <charset.h> #include <fs.h> #include <log.h> lib/efi_loader/efi_var_mem.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2020, Heinrich Schuchardt */ -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <u-boot/crc.h> lib/efi_loader/efi_variable.c +0
-1@@ -7,7 +7,6 @@#define LOG_CATEGORY LOGC_EFI -#include <common.h> #include <efi_loader.h> #include <efi_variable.h> #include <env.h> lib/efi_loader/efi_variable_tee.c +0
-1@@ -10,7 +10,6 @@* Abdellatif El Khlifi <[email protected]> */ -#include <common.h> #if CONFIG_IS_ENABLED (ARM_FFA_TRANSPORT )#include <arm_ffa.h> #endif lib/efi_loader/efi_watchdog.c +0
-1@@ -5,7 +5,6 @@* Copyright (c) 2017 Heinrich Schuchardt */ -#include <common.h> #include <efi_loader.h> /* Conversion factor from seconds to multiples of 100ns */ lib/efi_loader/initrddump.c +0
-2@@ -9,7 +9,6 @@* clearing of the screen. */ -#include <common.h> #include <efi_api.h> #include <efi_load_initrd.h> --2.34.1
PATCH 9/11 display_options: Clean up headers
In reply to Tom RiniIn include/display_options.h we cannot include ourself, but do need <linux/types.h> directly. Then in lib/display_options.c we further clean the list to remove common.h.
--- include/display_options.h | 3 ++- lib/display_options.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
include/display_options.h +2 -1
@@ -9,6 +9,8 @@#ifndef __DISPLAY_OPTIONS_H#define __DISPLAY_OPTIONS_H +#include <linux/types.h> +/** * print_size() - Print a size with a suffix *
@@ -19,7 +21,6 @@* @size: Size to print * @suffix String to print after the size */ -#include <display_options.h> void print_size (uint64_t size,const char *suffix);/**
lib/display_options.c +2 -1
@@ -4,14 +4,15 @@* Wolfgang Denk, DENX Software Engineering, [email protected]. */ -#include <common.h> #include <compiler.h> #include <console.h> #include <display_options.h> #include <div64.h> #include <version_string.h> #include <linux/ctype.h> +#include <linux/kernel.h> #include <asm/io.h> +#include <vsprintf.h> char *display_options_get_banner_priv (bool newlines,const char *build_tag,char *buf,int size)
Signature · 1 line
2.34.1
Re: [PATCH 09/11] display_options: Clean up headers
Quoted 10 lines · Tom Rini
In
include/display_options.hwe cannot include ourself, but do need <linux/types.h> directly. Then inlib/display_options.cwe further clean the list to removecommon.h.Signed-off-by Tom Rini <[email protected]>--- include/display_options.h | 3 ++- lib/display_options.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
PATCH 10/11 include: Further cleanup includes
In reply to Tom RiniAdd some missing headers such as <linux/errno.h> or <linux/types.h> or <linux/kernel.h> to header files that make direct usage of things provided by these headers.
--- include/atmel_lcd.h | 2 ++ include/getopt.h | 2 ++ include/mapmem.h | 2 ++ include/memalign.h | 1 + include/net6.h | 1 + include/rtc.h | 1 + 6 files changed, 9 insertions(+)
include/atmel_lcd.h +2 -0
@@ -9,6 +9,8 @@#ifndef _ATMEL_LCD_H_#define _ATMEL_LCD_H_ +#include <linux/types.h> +/** * struct atmel_lcd_plat - platform data for Atmel LCDs with driver model *
include/getopt.h +2 -0
@@ -9,6 +9,8 @@#ifndef __GETOPT_H#define __GETOPT_H +#include <stdbool.h> +/** * struct getopt_state - Saved state across getopt() calls */
include/mapmem.h +2 -0
@@ -13,6 +13,8 @@# ifdef CONFIG_ARCH_MAP_SYSMEM #include <asm/io.h> # else +#include <linux/types.h> +static inline void *map_sysmem (phys_addr_t paddr,unsigned long len) {return (void *)(uintptr_t )paddr;
include/memalign.h +1 -0
@@ -11,6 +11,7 @@* is used to align DMA buffers. */ #ifndef __ASSEMBLY__ +#include <linux/kernel.h> #include <asm/cache.h> #include <malloc.h>
include/net6.h +1 -0
@@ -12,6 +12,7 @@#include <net.h> #include <linux/ctype.h> +#include <linux/errno.h> /* struct in6_addr - 128 bits long IPv6 address */ struct in6_addr {
include/rtc.h +1 -0
@@ -16,6 +16,7 @@#include <bcd.h> #include <rtc_def.h> #include <linux/errno.h> +#include <linux/types.h> typedef int64_t time64_t ;struct udevice ;
Signature · 1 line
2.34.1
Re: [PATCH 10/11] include: Further cleanup includes
Quoted 6 lines · Tom Rini
Add some missing headers such as <
linux/errno.h> or <linux/types.h> or <linux/kernel.h> to header files that make direct usage of things provided by these headers.Signed-off-by Tom Rini <[email protected]>
Quoted 8 lines
--- include/atmel_lcd.h | 2 ++ include/getopt.h | 2 ++ include/mapmem.h | 2 ++ include/memalign.h | 1 + include/net6.h | 1 + include/rtc.h | 1 + 6 files changed, 9 insertions(+)
PATCH 11/11 lib: Remove <common.h> inclusion from these files
In reply to Tom RiniAfter some header file cleanups to add missing include files, remove common.h from all files in the lib directory. This primarily means just dropping the line but in a few cases we need to add in other header files now.
--- lib/abuf.c | 1 - lib/acpi/acpi.c | 1 - lib/acpi/acpi_device.c | 1 - lib/acpi/acpi_dp.c | 1 - lib/acpi/acpi_table.c | 1 - lib/acpi/acpi_writer.c | 2 +- lib/acpi/acpigen.c | 1 - lib/acpi/base.c | 3 ++- lib/acpi/csrt.c | 2 +- lib/acpi/dsdt.c | 2 +- lib/acpi/facs.c | 2 +- lib/acpi/mcfg.c | 4 +++- lib/acpi/ssdt.c | 3 ++- lib/addr_map.c | 1 - lib/aes.c | 2 +- lib/aes/aes-decrypt.c | 1 - lib/asm-offsets.c | 2 +- lib/at91/at91.c | 1 - lib/bch.c | 1 - lib/binman.c | 1 - lib/bzip2/bzlib.c | 3 +-- lib/bzip2/bzlib_decompress.c | 1 - lib/charset.c | 1 - lib/circbuf.c | 1 - lib/crc16-ccitt.c | 2 -- lib/crc32.c | 1 - lib/crc32c.c | 1 - lib/crc8.c | 2 -- lib/crypt/crypt-port.h | 3 +++ lib/crypt/crypt.c | 1 - lib/crypto/x509_public_key.c | 1 - lib/date.c | 1 - lib/dhry/cmd_dhry.c | 3 ++- lib/dhry/dhry_1.c | 2 +- lib/dhry/dhry_2.c | 2 +- lib/efi/efi.c | 1 - lib/efi/efi_app.c | 1 - lib/efi/efi_info.c | 1 - lib/efi/efi_stub.c | 1 - lib/efi_driver/efi_block_device.c | 1 - lib/efi_driver/efi_uclass.c | 1 - lib/efi_selftest/efi_selftest_esrt.c | 1 - lib/efi_selftest/efi_selftest_miniapp_exception.c | 1 - lib/efi_selftest/efi_selftest_miniapp_exit.c | 1 - lib/efi_selftest/efi_selftest_miniapp_return.c | 1 - lib/elf.c | 1 - lib/errno_str.c | 2 +- lib/fdtdec.c | 1 - lib/fdtdec_common.c | 1 - lib/fdtdec_test.c | 1 - lib/getopt.c | 2 +- lib/gunzip.c | 1 - lib/gzip.c | 1 - lib/hang.c | 2 +- lib/hash-checksum.c | 1 - lib/hashtable.c | 1 - lib/hexdump.c | 2 +- lib/image-sparse.c | 1 - lib/initcall.c | 1 - lib/linux_compat.c | 1 - lib/list_sort.c | 1 - lib/lmb.c | 1 - lib/lz4.c | 1 - lib/lz4_wrapper.c | 1 - lib/lzma/LzmaDec.c | 1 - lib/lzma/LzmaTools.c | 1 - lib/lzo/lzo1x_decompress.c | 3 ++- lib/md5.c | 1 - lib/membuff.c | 1 - lib/net_utils.c | 2 +- lib/of_live.c | 1 - lib/optee/optee.c | 1 - lib/panic.c | 1 - lib/physmem.c | 2 +- lib/qsort.c | 1 - lib/rand.c | 1 - lib/rc4.c | 3 --- lib/rsa/rsa-keyprop.c | 1 - lib/rsa/rsa-mod-exp.c | 1 - lib/rsa/rsa-verify.c | 1 - lib/rtc-lib.c | 1 - lib/semihosting.c | 3 ++- lib/slre.c | 2 +- lib/smbios-parser.c | 1 - lib/smbios.c | 1 - lib/strto.c | 2 +- lib/tables_csum.c | 3 +-- lib/time.c | 1 - lib/tiny-printf.c | 1 - lib/tpm-common.c | 1 - lib/tpm-v1.c | 1 - lib/tpm-v2.c | 1 - lib/tpm_api.c | 1 - lib/trace.c | 2 +- lib/uuid.c | 2 -- lib/vsprintf.c | 1 - lib/zstd/zstd.c | 2 +- 97 files changed, 36 insertions(+), 103 deletions(-)
lib/abuf.c +0 -1
@@ -7,7 +7,6 @@*/ #ifndef USE_HOSTCC -#include <common.h> #include <malloc.h> #include <mapmem.h> #include <string.h>
lib/acpi/acpi.c +0 -1
@@ -5,7 +5,6 @@* Copyright 2023 Google LLC */ -#include <common.h> #include <mapmem.h> #include <acpi/acpi_table.h> #include <asm/global_data.h>
lib/acpi/acpi_device.c +0 -1
@@ -6,7 +6,6 @@* Mostly taken from coreboot file of the same name */ -#include <common.h> #include <dm.h> #include <irq.h> #include <log.h>
lib/acpi/acpi_dp.c +0 -1
@@ -6,7 +6,6 @@* Mostly taken from coreboot file acpi_device.c */ -#include <common.h> #include <dm.h> #include <log.h> #include <malloc.h>
lib/acpi/acpi_table.c +0 -1
@@ -5,7 +5,6 @@* Copyright 2019 Google LLC */ -#include <common.h> #include <dm.h> #include <cpu.h> #include <log.h>
lib/acpi/acpi_writer.c +1 -1
@@ -7,13 +7,13 @@#define LOG_CATEGORY LOGC_ACPI -#include <common.h> #include <log.h> #include <malloc.h> #include <mapmem.h> #include <acpi/acpi_table.h> #include <asm/global_data.h> #include <dm/acpi.h> +#include <linux/errno.h> DECLARE_GLOBAL_DATA_PTR ;
lib/acpi/acpigen.c +0 -1
@@ -8,7 +8,6 @@#define LOG_CATEGORY LOGC_ACPI -#include <common.h> #include <dm.h> #include <log.h> #include <uuid.h>
lib/acpi/base.c +2 -1
@@ -7,11 +7,12 @@#define LOG_CATEGORY LOGC_ACPI -#include <common.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> #include <mapmem.h> #include <tables_csum.h> +#include <linux/errno.h> +#include <linux/string.h> void acpi_write_rsdp (struct acpi_rsdp *rsdp,struct acpi_rsdt *rsdt,struct acpi_xsdt *xsdt)
lib/acpi/csrt.c +1 -1
@@ -7,11 +7,11 @@#define LOG_CATEGORY LOGC_ACPI -#include <common.h> #include <mapmem.h> #include <tables_csum.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> +#include <linux/string.h> __weak int acpi_fill_csrt (struct acpi_ctx *ctx) {
lib/acpi/dsdt.c +1 -1
@@ -7,10 +7,10 @@#define LOG_CATEGORY LOGC_ACPI -#include <common.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> #include <tables_csum.h> +#include <linux/string.h> /* * IASL compiles the dsdt entries and writes the hex values
lib/acpi/facs.c +1 -1
@@ -7,9 +7,9 @@#define LOG_CATEGORY LOGC_ACPI -#include <common.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> +#include <linux/string.h> int acpi_write_facs (struct acpi_ctx *ctx,const struct acpi_writer *entry) {
lib/acpi/mcfg.c +3 -1
@@ -7,11 +7,13 @@#define LOG_CATEGORY LOGC_ACPI -#include <common.h> #include <mapmem.h> #include <tables_csum.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> +#include <linux/errno.h> +#include <linux/string.h> +#include <linux/types.h> int acpi_create_mcfg_mmconfig (struct acpi_mcfg_mmconfig *mmconfig,u32 base,u16 seg_nr,u8 start,u8 end)
lib/acpi/ssdt.c +2 -1
@@ -7,10 +7,11 @@#define LOG_CATEGORY LOGC_ACPI -#include <common.h> #include <acpi/acpi_table.h> #include <dm/acpi.h> #include <tables_csum.h> +#include <linux/errno.h> +#include <linux/string.h> int acpi_write_ssdt (struct acpi_ctx *ctx,const struct acpi_writer *entry) {
lib/addr_map.c +0 -1
@@ -3,7 +3,6 @@* Copyright 2008 Freescale Semiconductor, Inc. */ -#include <common.h> #include <addr_map.h> #include <mapmem.h>
lib/aes.c +1 -1
@@ -22,9 +22,9 @@*/ #ifndef USE_HOSTCC -#include <common.h> #include <display_options.h> #include <log.h> +#include <linux/string.h> #else #include <string.h> #endif
lib/aes/aes-decrypt.c +0 -1
@@ -4,7 +4,6 @@*/ #ifndef USE_HOSTCC -#include <common.h> #include <malloc.h> #endif #include <image.h>
lib/asm-offsets.c +1 -1
@@ -11,9 +11,9 @@* #defines from the assembly-language output. */ -#include <common.h> #include <asm-offsets.h> #include <asm/global_data.h> +#include <asm/u-boot.h> #include <linux/kbuild.h>
lib/at91/at91.c +0 -1
@@ -4,7 +4,6 @@* Wenyou.Yang <[email protected]> */ -#include <common.h> #include <atmel_lcd.h> #include "atmel_logo_8bpp.h"
lib/bch.c +0 -1
@@ -54,7 +54,6 @@*/ #ifndef USE_HOSTCC -#include <common.h> #include <log.h> #include <malloc.h> #include <ubi_uboot.h>
lib/binman.c +0 -1
@@ -6,7 +6,6 @@* Written by Simon Glass <[email protected]> */ -#include <common.h> #include <binman.h> #include <dm.h> #include <log.h>
lib/bzip2/bzlib.c +1 -2
@@ -1,7 +1,6 @@ -#include <config.h> -#include <common.h> #include <malloc.h> #include <watchdog.h> +#include <stdio.h> /* * This file is a modified version of bzlib.c from the bzip2-1.0.2
lib/bzip2/bzlib_decompress.c +0 -1
@@ -1,5 +1,4 @@#include <config.h> -#include <common.h> #include <watchdog.h> /*-------------------------------------------------------------*/
lib/charset.c +0 -1
@@ -5,7 +5,6 @@* Copyright (c) 2017 Rob Clark */ -#include <common.h> #include <charset.h> #include <capitalization.h> #include <cp437.h>
lib/circbuf.c +0 -1
@@ -4,7 +4,6 @@* Gerry Hamel, [email protected], Texas Instruments */ -#include <common.h> #include <log.h> #include <malloc.h>
lib/crc16-ccitt.c +0 -2
@@ -24,8 +24,6 @@#ifdef USE_HOSTCC #include <arpa/inet.h> -#else -#include <common.h> #endif #include <u-boot/crc.h>
lib/crc32.c +0 -1
@@ -11,7 +11,6 @@#ifdef USE_HOSTCC #include <arpa/inet.h> #else -#include <common.h> #include <efi_loader.h> #endif #include <compiler.h>
lib/crc32c.c +0 -1
@@ -10,7 +10,6 @@* any later version. */ -#include <common.h> #include <compiler.h> uint32_t crc32c_cal(uint32_t crc, const char *data, int length,
lib/crc8.c +0 -2
@@ -5,8 +5,6 @@#ifdef USE_HOSTCC #include <arpa/inet.h> -#else -#include <common.h> #endif #include <u-boot/crc.h>
lib/crypt/crypt-port.h +3 -0
@@ -1,6 +1,9 @@/* SPDX-License-Identifier: GPL-2.0+ */ /* Copyright (C) 2020 Steffen Jaeckel <[email protected]> */ +#include <linux/errno.h> +#include <linux/kernel.h> +#include <linux/string.h> #include <linux/types.h> #include <vsprintf.h>
lib/crypt/crypt.c +0 -1
@@ -1,7 +1,6 @@// SPDX-License-Identifier: GPL-2.0+ /* Copyright (C) 2020 Steffen Jaeckel <[email protected]> */ -#include <common.h> #include <crypt.h> #include "crypt-port.h"
lib/crypto/x509_public_key.c +0 -1
@@ -7,7 +7,6 @@#define pr_fmt (fmt) "X.509: "fmt#ifdef __UBOOT__ -#include <common.h> #include <image.h> #include <dm/devres.h> #include <linux/compat.h>
lib/date.c +0 -1
@@ -4,7 +4,6 @@* Wolfgang Denk, DENX Software Engineering, [email protected]. */ -#include <common.h> #include <command.h> #include <errno.h> #include <rtc.h>
lib/dhry/cmd_dhry.c +2 -1
@@ -3,9 +3,10 @@* (C) Copyright 2015 Google, Inc */ -#include <common.h> #include <command.h> #include <div64.h> +#include <time.h> +#include <vsprintf.h> #include "dhry.h" static int do_dhry(struct cmd_tbl *cmdtp, int flag, int argc,
lib/dhry/dhry_1.c +1 -1
@@ -42,8 +42,8 @@***************************************************************************/ char SCCSid[] ="@(#) @(#)dhry_1.c:3.4 -- 5/15/91 19:30:21" ; -#include <common.h> #include <malloc.h> +#include <stdio.h> #include "dhry.h"
lib/dhry/dhry_2.c +1 -1
@@ -39,7 +39,7 @@****************************************************************************/ /* SCCSid is defined in dhry_1.c */ -#include <common.h> +#include <linux/string.h> #include "dhry.h" #ifndef REG
lib/efi/efi.c +0 -1
@@ -10,7 +10,6 @@* Common EFI functions */ -#include <common.h> #include <debug_uart.h> #include <errno.h> #include <malloc.h>
lib/efi/efi_app.c +0 -1
@@ -8,7 +8,6 @@* This file implements U-Boot running as an EFI application. */ -#include <common.h> #include <cpu_func.h> #include <debug_uart.h> #include <dm.h>
lib/efi/efi_info.c +0 -1
@@ -5,7 +5,6 @@* Access to the EFI information table */ -#include <common.h> #include <efi.h> #include <errno.h> #include <mapmem.h>
lib/efi/efi_stub.c +0 -1
@@ -9,7 +9,6 @@* EFI application. It can be built either in 32-bit or 64-bit mode. */ -#include <common.h> #include <debug_uart.h> #include <efi.h> #include <efi_api.h>
lib/efi_driver/efi_block_device.c +0 -1
@@ -28,7 +28,6 @@* iPXE uses the simple file protocol to load Grub or the Linux Kernel. */ -#include <common.h> #include <blk.h> #include <dm.h> #include <efi_driver.h>
lib/efi_driver/efi_uclass.c +0 -1
@@ -17,7 +17,6 @@* controllers. */ -#include <common.h> #include <dm.h> #include <efi_driver.h> #include <log.h>
lib/efi_selftest/efi_selftest_esrt.c +0 -1
@@ -4,7 +4,6 @@* * Copyright (C) 2021 Arm Ltd. */ -#include <common.h> #include <efi_loader.h> #include <efi_selftest.h>
lib/efi_selftest/efi_selftest_miniapp_exception.c +0 -1
@@ -7,7 +7,6 @@* This EFI application triggers an exception. */ -#include <common.h> #include <efi_api.h> #include <host_arch.h>
lib/efi_selftest/efi_selftest_miniapp_exit.c +0 -1
@@ -8,7 +8,6 @@* It uses the Exit boot service to return. */ -#include <common.h> #include <efi_selftest.h> static efi_guid_t loaded_image_protocol_guid =EFI_LOADED_IMAGE_PROTOCOL_GUID ;
lib/efi_selftest/efi_selftest_miniapp_return.c +0 -1
@@ -8,7 +8,6 @@* It returns directly without calling the Exit boot service. */ -#include <common.h> #include <efi_api.h> /*
lib/elf.c +0 -1
@@ -3,7 +3,6 @@Copyright (c) 2001 William L. Pitts */ -#include <common.h> #include <command.h> #include <cpu_func.h> #include <elf.h>
lib/errno_str.c +1 -1
@@ -4,8 +4,8 @@* * SDPX-License-Identifier: GPL-2.0+ */ -#include <common.h> #include <errno.h> +#include <linux/kernel.h> #define ERRNO_MSG (errno, msg) msg#define SAME_AS (x) (const char *)&errno_message[x]
lib/fdtdec.c +0 -1
@@ -7,7 +7,6 @@*/ #ifndef USE_HOSTCC -#include <common.h> #include <boot_fit.h> #include <display_options.h> #include <dm.h>
lib/fdtdec_common.c +0 -1
@@ -8,7 +8,6 @@*/ #ifndef USE_HOSTCC -#include <common.h> #include <log.h> #include <linux/libfdt.h> #include <fdtdec.h>
lib/fdtdec_test.c +0 -1
@@ -6,7 +6,6 @@* Copyright (c) 2011 The Chromium OS Authors. */ -#include <common.h> #include <command.h> #include <fdtdec.h> #include <linux/libfdt.h>
lib/getopt.c +1 -1
@@ -8,9 +8,9 @@#define LOG_CATEGORY LOGC_CORE -#include <common.h> #include <getopt.h> #include <log.h> +#include <linux/string.h> void getopt_init_state (struct getopt_state *gs) {
lib/gunzip.c +0 -1
@@ -4,7 +4,6 @@* Wolfgang Denk, DENX Software Engineering, [email protected]. */ -#include <common.h> #include <blk.h> #include <command.h> #include <console.h>
lib/gzip.c +0 -1
@@ -4,7 +4,6 @@* Lei Wen <[email protected]>, Marvell Inc. */ -#include <common.h> #include <watchdog.h> #include <command.h> #include <gzip.h>
lib/hang.c +1 -1
@@ -7,9 +7,9 @@* u-boot. */ -#include <common.h> #include <bootstage.h> #include <hang.h> +#include <stdio.h> #include <os.h> /**
lib/hash-checksum.c +0 -1
@@ -4,7 +4,6 @@*/ #ifndef USE_HOSTCC -#include <common.h> #include <fdtdec.h> #include <asm/byteorder.h> #include <linux/errno.h>
lib/hashtable.c +0 -1
@@ -30,7 +30,6 @@# endif # endif #else /* U-Boot build */ -# include <common.h> # include <linux/string.h> # include <linux/ctype.h> #endif
lib/hexdump.c +1 -1
@@ -8,9 +8,9 @@* more details. */ -#include <common.h> #include <hexdump.h> #include <mapmem.h> +#include <vsprintf.h> #include <linux/ctype.h> #include <linux/compat.h> #include <linux/log2.h>
lib/image-sparse.c +0 -1
@@ -35,7 +35,6 @@*/ #include <config.h> -#include <common.h> #include <blk.h> #include <image-sparse.h> #include <div64.h>
lib/initcall.c +0 -1
@@ -3,7 +3,6 @@* Copyright (c) 2013 The Chromium OS Authors. */ -#include <common.h> #include <efi.h> #include <initcall.h> #include <log.h>
lib/linux_compat.c +0 -1
@@ -1,5 +1,4 @@ -#include <common.h> #include <malloc.h> #include <memalign.h> #include <asm/cache.h>
lib/list_sort.c +0 -1
@@ -6,7 +6,6 @@#include <linux/slab.h> #else #include <linux/compat.h> -#include <common.h> #include <malloc.h> #include <linux/printk.h> #endif
lib/lmb.c +0 -1
@@ -6,7 +6,6 @@* Copyright (C) 2001 Peter Bergner. */ -#include <common.h> #include <efi_loader.h> #include <image.h> #include <mapmem.h>
lib/lz4.c +0 -1
@@ -27,7 +27,6 @@* - LZ4 homepage : http://www.lz4.org * - LZ4 source repository : https://github.com/lz4/lz4 */ -#include <common.h> #include <compiler.h> #include <linux/kernel.h> #include <linux/types.h>
lib/lz4_wrapper.c +0 -1
@@ -3,7 +3,6 @@* Copyright 2015 Google Inc. */ -#include <common.h> #include <compiler.h> #include <image.h> #include <linux/kernel.h>
lib/lzma/LzmaDec.c +0 -1
@@ -2,7 +2,6 @@2009-09-20 : Igor Pavlov : Public domain */ #include <config.h> -#include <common.h> #include <watchdog.h> #include "LzmaDec.h"
lib/lzma/LzmaTools.c +0 -1
@@ -18,7 +18,6 @@*/ #include <config.h> -#include <common.h> #include <log.h> #include <watchdog.h>
lib/lzo/lzo1x_decompress.c +2 -1
@@ -11,8 +11,9 @@* Richard Purdie <[email protected]> */ -#include <common.h> +#include <linux/kernel.h> #include <linux/lzo.h> +#include <linux/string.h> #include <asm/byteorder.h> #include <asm/unaligned.h> #include "lzodefs.h"
lib/md5.c +0 -1
@@ -28,7 +28,6 @@#include "compiler.h" #ifndef USE_HOSTCC -#include <common.h> #include <watchdog.h> #endif /* USE_HOSTCC */ #include <u-boot/md5.h>
lib/membuff.c +0 -1
@@ -6,7 +6,6 @@* Copyright (c) 1992 Simon Glass */ -#include <common.h> #include <errno.h> #include <log.h> #include <malloc.h>
lib/net_utils.c +1 -1
@@ -9,9 +9,9 @@* Copyright 2009 Dirk Behme, [email protected] */ -#include <common.h> #include <net.h> #include <net6.h> +#include <vsprintf.h> struct in_addr string_to_ip (const char *s) {
lib/of_live.c +0 -1
@@ -10,7 +10,6 @@#define LOG_CATEGORY LOGC_DT -#include <common.h> #include <abuf.h> #include <log.h> #include <linux/libfdt.h>
lib/optee/optee.c +0 -1
@@ -4,7 +4,6 @@* Bryan O'Donoghue <[email protected]> */ -#include <common.h> #include <fdtdec.h> #include <image.h> #include <log.h>
lib/panic.c +0 -1
@@ -9,7 +9,6 @@* Wirzenius wrote this portably, Torvalds fucked it up :-) */ -#include <common.h> #include <hang.h> #if !defined(CONFIG_PANIC_HANG )#include <command.h>
lib/physmem.c +1 -1
@@ -8,11 +8,11 @@* Software Foundation. */ -#include <common.h> #include <log.h> #include <mapmem.h> #include <physmem.h> #include <linux/compiler.h> +#include <linux/string.h> phys_addr_t __weak arch_phys_memset (phys_addr_t s,int c,phys_size_t n) {
lib/qsort.c +0 -1
@@ -17,7 +17,6 @@#include <log.h> #include <linux/types.h> -#include <common.h> #include <exports.h> #include <sort.h>
lib/rand.c +0 -1
@@ -7,7 +7,6 @@* Michael Walle <[email protected]> */ -#include <common.h> #include <rand.h> static unsigned int y =1U ;
lib/rc4.c +0 -3
@@ -7,9 +7,6 @@* Rivest Cipher 4 (RC4) implementation */ -#ifndef USE_HOSTCC -#include <common.h> -#endif #include <rc4.h> void rc4_encode (unsigned char *buf,unsigned int len,const unsigned char key[16 ])
lib/rsa/rsa-keyprop.c +0 -1
@@ -9,7 +9,6 @@* Copyright (c) 2016 Thomas Pornin <[email protected]> */ -#include <common.h> #include <image.h> #include <malloc.h> #include <crypto/internal/rsa.h>
lib/rsa/rsa-mod-exp.c +0 -1
@@ -4,7 +4,6 @@*/ #ifndef USE_HOSTCC -#include <common.h> #include <fdtdec.h> #include <log.h> #include <asm/types.h>
lib/rsa/rsa-verify.c +0 -1
@@ -4,7 +4,6 @@*/ #ifndef USE_HOSTCC -#include <common.h> #include <fdtdec.h> #include <log.h> #include <malloc.h>
lib/rtc-lib.c +0 -1
@@ -10,7 +10,6 @@* - January is month 1. */ -#include <common.h> #include <rtc.h> #include <linux/math64.h>
lib/semihosting.c +2 -1
@@ -4,9 +4,10 @@* Copyright 2014 Broadcom Corporation */ -#include <common.h> #include <log.h> #include <semihosting.h> +#include <linux/errno.h> +#include <linux/string.h> #define SYSOPEN 0x01#define SYSCLOSE 0x02
lib/slre.c +1 -1
@@ -21,8 +21,8 @@#include <string.h> #else #include <log.h> -#include <common.h> #include <linux/ctype.h> +#include <linux/string.h> #endif /* SLRE_TEST */ #include <errno.h>
lib/smbios-parser.c +0 -1
@@ -5,7 +5,6 @@#define LOG_CATEGORY LOGC_BOOT -#include <common.h> #include <smbios.h> static inline int verify_checksum (const struct smbios_entry *e)
lib/smbios.c +0 -1
@@ -5,7 +5,6 @@* Adapted from coreboot src/arch/x86/smbios.c */ -#include <common.h> #include <dm.h> #include <env.h> #include <linux/stringify.h>
lib/strto.c +1 -1
@@ -9,9 +9,9 @@* Wirzenius wrote this portably, Torvalds fucked it up :-) */ -#include <common.h> #include <errno.h> #include <malloc.h> +#include <vsprintf.h> #include <linux/ctype.h> /* from lib/kstrtox.c */
lib/tables_csum.c +1 -2
@@ -3,8 +3,7 @@* Copyright (C) 2015, Bin Meng <[email protected]> */ -#include <common.h> -#include <linux/ctype.h> +#include <linux/types.h> u8 table_compute_checksum (void *v,int len) {
lib/time.c +0 -1
@@ -4,7 +4,6 @@* Wolfgang Denk, DENX Software Engineering, [email protected]. */ -#include <common.h> #include <clock_legacy.h> #include <bootstage.h> #include <dm.h>
lib/tiny-printf.c +0 -1
@@ -8,7 +8,6 @@* Copyright (C) 2004,2008 Kustaa Nyholm */ -#include <common.h> #include <log.h> #include <serial.h> #include <stdarg.h>
lib/tpm-common.c +0 -1
@@ -6,7 +6,6 @@#define LOG_CATEGORY UCLASS_TPM -#include <common.h> #include <dm.h> #include <log.h> #include <asm/unaligned.h>
lib/tpm-v1.c +0 -1
@@ -6,7 +6,6 @@#define LOG_CATEGORY UCLASS_TPM -#include <common.h> #include <dm.h> #include <log.h> #include <asm/unaligned.h>
lib/tpm-v2.c +0 -1
@@ -5,7 +5,6 @@* Author: Miquel Raynal <[email protected]> */ -#include <common.h> #include <dm.h> #include <dm/of_access.h> #include <tpm_api.h>
lib/tpm_api.c +0 -1
@@ -3,7 +3,6 @@* Copyright 2019 Google LLC */ -#include <common.h> #include <dm.h> #include <log.h> #include <tpm_api.h>
lib/trace.c +1 -1
@@ -3,10 +3,10 @@* Copyright (c) 2012 The Chromium OS Authors. */ -#include <common.h> #include <mapmem.h> #include <time.h> #include <trace.h> +#include <linux/errno.h> #include <asm/global_data.h> #include <asm/io.h> #include <asm/sections.h>
lib/uuid.c +0 -2
@@ -9,7 +9,6 @@#define LOG_CATEGOT LOGC_CORE -#include <common.h> #include <command.h> #include <efi_api.h> #include <env.h>
@@ -18,7 +17,6 @@#include <uuid.h> #include <linux/ctype.h> #include <errno.h> -#include <common.h> #include <asm/io.h> #include <part_efi.h> #include <malloc.h>
lib/vsprintf.c +0 -1
@@ -13,7 +13,6 @@* from hush: simple_itoa() was lifted from boa-0.93.15 */ -#include <common.h> #include <charset.h> #include <efi_loader.h> #include <div64.h>
lib/zstd/zstd.c +1 -1
@@ -5,10 +5,10 @@#define LOG_CATEGORY LOGC_BOOT -#include <common.h> #include <abuf.h> #include <log.h> #include <malloc.h> +#include <linux/errno.h> #include <linux/zstd.h> int zstd_decompress (struct abuf *in,struct abuf *out)
Signature · 1 line
2.34.1
Re: [PATCH 11/11] lib: Remove <common.h> inclusion from these files
Quoted 98 lines · Tom Rini
After some header file cleanups to add missing include files, remove
common.hfrom all files in the lib directory. This primarily means just dropping the line but in a few cases we need to add in other header files now.Signed-off-by Tom Rini <[email protected]>--- lib/abuf.c | 1 - lib/acpi/acpi.c | 1 - lib/acpi/acpi_device.c | 1 - lib/acpi/acpi_dp.c | 1 - lib/acpi/acpi_table.c | 1 - lib/acpi/acpi_writer.c | 2 +- lib/acpi/acpigen.c | 1 - lib/acpi/base.c | 3 ++- lib/acpi/csrt.c | 2 +- lib/acpi/dsdt.c | 2 +- lib/acpi/facs.c | 2 +- lib/acpi/mcfg.c | 4 +++- lib/acpi/ssdt.c | 3 ++- lib/addr_map.c | 1 - lib/aes.c | 2 +- lib/aes/aes-decrypt.c | 1 - lib/asm-offsets.c | 2 +- lib/at91/at91.c | 1 - lib/bch.c | 1 - lib/binman.c | 1 - lib/bzip2/bzlib.c | 3 +-- lib/bzip2/bzlib_decompress.c | 1 - lib/charset.c | 1 - lib/circbuf.c | 1 - lib/crc16-ccitt.c | 2 -- lib/crc32.c | 1 - lib/crc32c.c | 1 - lib/crc8.c | 2 -- lib/crypt/crypt-port.h | 3 +++ lib/crypt/crypt.c | 1 - lib/crypto/x509_public_key.c | 1 - lib/date.c | 1 - lib/dhry/cmd_dhry.c | 3 ++- lib/dhry/dhry_1.c | 2 +- lib/dhry/dhry_2.c | 2 +- lib/efi/efi.c | 1 - lib/efi/efi_app.c | 1 - lib/efi/efi_info.c | 1 - lib/efi/efi_stub.c | 1 - lib/efi_driver/efi_block_device.c | 1 - lib/efi_driver/efi_uclass.c | 1 - lib/efi_selftest/efi_selftest_esrt.c | 1 - lib/efi_selftest/efi_selftest_miniapp_exception.c | 1 - lib/efi_selftest/efi_selftest_miniapp_exit.c | 1 - lib/efi_selftest/efi_selftest_miniapp_return.c | 1 - lib/elf.c | 1 - lib/errno_str.c | 2 +- lib/fdtdec.c | 1 - lib/fdtdec_common.c | 1 - lib/fdtdec_test.c | 1 - lib/getopt.c | 2 +- lib/gunzip.c | 1 - lib/gzip.c | 1 - lib/hang.c | 2 +- lib/hash-checksum.c | 1 - lib/hashtable.c | 1 - lib/hexdump.c | 2 +- lib/image-sparse.c | 1 - lib/initcall.c | 1 - lib/linux_compat.c | 1 - lib/list_sort.c | 1 - lib/lmb.c | 1 - lib/lz4.c | 1 - lib/lz4_wrapper.c | 1 - lib/lzma/LzmaDec.c | 1 - lib/lzma/LzmaTools.c | 1 - lib/lzo/lzo1x_decompress.c | 3 ++- lib/md5.c | 1 - lib/membuff.c | 1 - lib/net_utils.c | 2 +- lib/of_live.c | 1 - lib/optee/optee.c | 1 - lib/panic.c | 1 - lib/physmem.c | 2 +- lib/qsort.c | 1 - lib/rand.c | 1 - lib/rc4.c | 3 --- lib/rsa/rsa-keyprop.c | 1 - lib/rsa/rsa-mod-exp.c | 1 - lib/rsa/rsa-verify.c | 1 - lib/rtc-lib.c | 1 - lib/semihosting.c | 3 ++- lib/slre.c | 2 +- lib/smbios-parser.c | 1 - lib/smbios.c | 1 - lib/strto.c | 2 +- lib/tables_csum.c | 3 +-- lib/time.c | 1 - lib/tiny-printf.c | 1 - lib/tpm-common.c | 1 -
Quoted 9 lines
lib/tpm-v1.c | 1 - lib/tpm-v2.c | 1 - lib/tpm_api.c | 1 - lib/trace.c | 2 +- lib/uuid.c | 2 -- lib/vsprintf.c | 1 - lib/zstd/zstd.c | 2 +- 97 files changed, 36 insertions(+), 103 deletions(-)
Quoted 5 lines · Tom Rini
These files include <
common.h> twice. Start by removing the second inclusion of the file.Signed-off-by Tom Rini <[email protected]>
Quoted 10 lines
--- board/data_modul/common/common.c | 1 - board/grinn/liteboard/board.c | 1 - board/toradex/colibri_imx7/colibri_imx7.c | 1 - board/wandboard/wandboard.c | 1 - drivers/gpio/gpio-aspeed.c | 1 - drivers/spi/fsl_dspi.c | 1 - drivers/video/exynos/exynos_dp.c | 1 - 7 files changed, 7 deletions(-)