]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
global: Add <linux/string.h> instead of long indirect include path
authorTom Rini <trini@konsulko.com>
Wed, 14 May 2025 18:15:31 +0000 (12:15 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 14 May 2025 18:15:31 +0000 (12:15 -0600)
In a number of cases we have C files which rely on a chain of indirect
include paths to get <linux/string.h> to be included via <command.h>. To
facilitate cleaning up <command.h> make this code directly include
<linux/string.h>.

Signed-off-by: Tom Rini <trini@konsulko.com>
---
Cc: Andrew Davis <afd@ti.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Dai Okamura <okamura.dai@socionext.com>
Cc: Fabio Estevam <festevam@gmail.com>
Cc: Francesco Dolcini <francesco.dolcini@toradex.com>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Jens Wiklander <jens.wiklander@linaro.org>
Cc: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Cc: Mingkai Hu <mingkai.hu@nxp.com>
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Cc: Shengzhou Liu <Shengzhou.Liu@nxp.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Stefano Babic <sbabic@nabladev.com>
Cc: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Thierry Reding <treding@nvidia.com>
Cc: William Zhang <william.zhang@broadcom.com>
41 files changed:
arch/arm/mach-imx/mx5/clock.c
arch/arm/mach-keystone/cmd_clock.c
arch/arm/mach-tegra/tegra124/bct.c
arch/arm/mach-tegra/tegra20/bct.c
arch/arm/mach-tegra/tegra30/bct.c
arch/arm/mach-uniphier/dram/cmd_ddrmphy.c
arch/arm/mach-uniphier/dram/cmd_ddrphy.c
board/freescale/common/qixis.c
board/freescale/ls1043ardb/cpld.c
board/freescale/ls1046ardb/cpld.c
board/freescale/p2041rdb/cpld.c
board/freescale/t102xrdb/cpld.c
board/freescale/t104xrdb/cpld.c
board/freescale/t208xrdb/cpld.c
board/freescale/t4rdb/cpld.c
board/toradex/apalis_imx6/do_fuse.c
board/toradex/colibri_imx6/do_fuse.c
boot/image-pre-load.c
cmd/2048.c
cmd/armflash.c
cmd/bootstage.c
cmd/cache.c
cmd/diag.c
cmd/dm.c
cmd/echo.c
cmd/flash.c
cmd/fuse.c
cmd/irq.c
cmd/legacy_led.c
cmd/mp.c
cmd/optee.c
cmd/sha1sum.c
cmd/sleep.c
cmd/smccc.c
cmd/stackprot_test.c
cmd/strings.c
cmd/test.c
cmd/timer.c
cmd/ufs.c
cmd/x86/mtrr.c
drivers/tpm/sandbox_common.c

index 41116e2c6a2cf93791f9cb4762ebc8add5959eb4..9901f8a7b56fe854bf481dde58cf0bb3ae409bf2 100644 (file)
@@ -10,6 +10,7 @@
 #include <log.h>
 #include <asm/io.h>
 #include <linux/errno.h>
+#include <linux/string.h>
 #include <asm/arch/imx-regs.h>
 #include <asm/arch/crm_regs.h>
 #include <asm/arch/clock.h>
index e9ecc05953a8739ae7e2bbe1805f09fb7e1ad547..7b94a80b725e7e6e4346e7e7d57fcc2c9df5c9cc 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <vsprintf.h>
 #include <command.h>
+#include <linux/string.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/clock.h>
 #include <asm/arch/psc_defs.h>
index a71aa87fce12711094a934618517f2641540c163..4dc4b7138ab806149fa734ca03b471bbeb4a6ab3 100644 (file)
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 #include <asm/arch-tegra/crypto.h>
 #include "bct.h"
 #include "uboot_aes.h"
index b647b6b26d2a7c7282f87f8819824e6547495b56..253cb2436761a43f64fa9f6b1f8a698c7d9b6d19 100644 (file)
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 #include <asm/arch-tegra/crypto.h>
 #include "bct.h"
 #include "uboot_aes.h"
index 250009ea8d8ec59097296ae0407806be444835ed..398ba1de3869351a20ab435e7e32cd0f6910b74c 100644 (file)
@@ -7,6 +7,7 @@
 #include <command.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 #include <asm/arch-tegra/crypto.h>
 #include "bct.h"
 #include "uboot_aes.h"
index 629f8b90c9d869b5b2a082f15499d63f74524e1b..be4ce3265bb885a2938bc67d080212e32835c344 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/io.h>
 #include <linux/printk.h>
 #include <linux/sizes.h>
+#include <linux/string.h>
 
 #include "../soc-info.h"
 #include "ddrmphy-regs.h"
index ca519d1c7e0c6be37d0ef00cbbc30b72a763fcc4..3ccafe20638296ed8ae9f2eec00e2160cce841f4 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/io.h>
 #include <linux/printk.h>
 #include <linux/sizes.h>
+#include <linux/string.h>
 
 #include "../soc-info.h"
 #include "ddrphy-regs.h"
index 7815ba2dbce940dc4ded370854be91aa6bcd950a..04cad48f033acd8a87b438dcd56b631943b912ec 100644 (file)
@@ -12,6 +12,7 @@
 #include <asm/io.h>
 #include <linux/compiler.h>
 #include <linux/time.h>
+#include <linux/string.h>
 #include <i2c.h>
 #include "qixis.h"
 
index bda2f3ac3a69c8c06e9a159639f748c1b19f40d4..39b6c6449cf71174c58cef9cfb6d84161e92fd3e 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <config.h>
 #include <command.h>
+#include <linux/string.h>
 #include <asm/io.h>
 #include "cpld.h"
 
index 7f8ca2e857fdf0fa336404459f64070cfba09389..26a5962bd6eeaa339de42454bb4f57277d75daca 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <config.h>
 #include <command.h>
+#include <linux/string.h>
 #include <asm/io.h>
 #include "cpld.h"
 
index 915a8b994d5c2ba296f775bf5af6f3149aecaa01..2bba377d4d452dd14db4d5bf71f2697e35c7a580 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <command.h>
+#include <linux/string.h>
 #include <asm/io.h>
 
 #include "cpld.h"
index cc933ccd5440ec0b91037a9fd1fc91fbf8b79898..00ea9d8f5038cb8880fae3b25ec017957c1a198a 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <config.h>
 #include <command.h>
+#include <linux/string.h>
 #include <asm/io.h>
 #include "cpld.h"
 
index c2d526ae15ac4e667822d2b3867201eab2b375c0..038e40e2faefa0baa35578820252ee3b4bfa63b5 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <config.h>
 #include <command.h>
+#include <linux/string.h>
 #include <asm/io.h>
 
 #include "cpld.h"
index d2226af627863ecae316e3a69f14d39602d3a81b..838d88d977e5d8d63c3a1e3abf1c65449ead471b 100644 (file)
@@ -7,6 +7,7 @@
 
 #include <config.h>
 #include <command.h>
+#include <linux/string.h>
 #include <asm/io.h>
 #include "cpld.h"
 
index f076350c1c55bf4da8d282ac49b7a312f931eb51..258581eee960e4fa509b8501c668fe0a543ca273 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <config.h>
 #include <command.h>
+#include <linux/string.h>
 #include <asm/io.h>
 
 #include "cpld.h"
index 698b05bc5ad5d7aa6c865c6097b144786f60b2db..8721276bed83ec0ddc9d1e8103b91cde5d3b2d52 100644 (file)
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <console.h>
 #include <fuse.h>
+#include <linux/string.h>
 
 static int mfgr_fuse(void)
 {
index 698b05bc5ad5d7aa6c865c6097b144786f60b2db..8721276bed83ec0ddc9d1e8103b91cde5d3b2d52 100644 (file)
@@ -11,6 +11,7 @@
 #include <command.h>
 #include <console.h>
 #include <fuse.h>
+#include <linux/string.h>
 
 static int mfgr_fuse(void)
 {
index adf3b341a203b80bce76d2b260de94ad14467392..2f851ebb28c2832cb823c4c4cbb33beb0584a2a4 100644 (file)
@@ -7,6 +7,7 @@
 #include "mkimage.h"
 #else
 #include <asm/global_data.h>
+#include <env.h>
 #include <mapmem.h>
 DECLARE_GLOBAL_DATA_PTR;
 #endif /* !USE_HOSTCC*/
index 42cd171b0e41708606c9d7bffd0585f7770ffbdc..aa0f82721dc172a877685bd01c54960142aa93f1 100644 (file)
@@ -8,6 +8,7 @@
 #include <rand.h>
 #include <vsprintf.h>
 #include <linux/delay.h>
+#include <linux/string.h>
 
 #define SIZE 4
 static uint score;
index e292cf85c45dc17eebcc353541f19e47213e7d71..83f616db4efb7db6f73b4070e2ee901b247baa72 100644 (file)
@@ -9,6 +9,7 @@
 #include <console.h>
 #include <flash.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 #include <asm/io.h>
 
 #define MAX_REGIONS 4
index 8248c41ca8262e1d11196a89472474f5894bd5d7..5c6d5a3ab45325d8a2a5f1eba53d01158fe8bd85 100644 (file)
@@ -6,6 +6,7 @@
 #include <bootstage.h>
 #include <command.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 
 static int do_bootstage_report(struct cmd_tbl *cmdtp, int flag, int argc,
                               char *const argv[])
index 3049f5c305f2c612a43d7c91b53c67534bb46d6f..b7007877ab03cc95b04c07c8c45bdd74f6d56fbf 100644 (file)
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <linux/compiler.h>
+#include <linux/string.h>
 
 static int parse_argv(const char *);
 
index c6da5aae3fcd9aeba2e62144ace249bf26d63f6a..4a88ab00a074f3ef48cf4f8f985d6c42d71a3161 100644 (file)
@@ -9,6 +9,7 @@
  */
 #include <command.h>
 #include <post.h>
+#include <linux/string.h>
 
 int do_diag(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
index ec9cfd85376e3f62a836b677b3ac1818559da2de..1f212c0f0309161cbf320df2cd5fe072e2e59cc4 100644 (file)
--- a/cmd/dm.c
+++ b/cmd/dm.c
@@ -9,6 +9,7 @@
 #include <command.h>
 #include <dm/root.h>
 #include <dm/util.h>
+#include <linux/string.h>
 
 static int do_dm_dump_driver_compat(struct cmd_tbl *cmdtp, int flag, int argc,
                                    char * const argv[])
index 973213a03a66b57af5172e470a095b0e94f58e51..d1346504cfb5119a27bef33588d9884472607ddc 100644 (file)
@@ -5,6 +5,7 @@
  */
 
 #include <command.h>
+#include <linux/string.h>
 
 static int do_echo(struct cmd_tbl *cmdtp, int flag, int argc,
                   char *const argv[])
index fd660ec477c9219519167370035a9dac67937f02..76aa387ba596860ff0a2792dfcaeba4c0524da5e 100644 (file)
@@ -10,6 +10,7 @@
 #include <command.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 #include <u-boot/uuid.h>
 
 #if defined(CONFIG_CMD_MTDPARTS)
index 6c42c096809332acc911886fe23cef323ab7f7e7..e2206cdf0d54a5422a9c5e02eb06f6e746c79f97 100644 (file)
@@ -14,6 +14,7 @@
 #include <mapmem.h>
 #include <vsprintf.h>
 #include <linux/errno.h>
+#include <linux/string.h>
 
 static int confirm_prog(void)
 {
index da223b4b2cce77c4b851b152f4b74693869c23c7..58483d04de826cb8c46541e715f81a0a94f06b82 100644 (file)
--- a/cmd/irq.c
+++ b/cmd/irq.c
@@ -6,6 +6,7 @@
 #include <config.h>
 #include <command.h>
 #include <irq_func.h>
+#include <linux/string.h>
 
 static int do_interrupts(struct cmd_tbl *cmdtp, int flag, int argc,
                         char *const argv[])
index 50de7e89d8f4c0533497fd907ef674c788cd2d5a..db312ae6e2dd8b02abb35e8579447f67feb5ca87 100644 (file)
@@ -12,6 +12,7 @@
 #include <command.h>
 #include <status_led.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 
 struct led_tbl_s {
        char            *string;        /* String for use in the command */
index 261bb8a07d43416e61846cce88494209551b558f..686e1f8a82fc7eece3add22fd48180e54288f2a3 100644 (file)
--- a/cmd/mp.c
+++ b/cmd/mp.c
@@ -6,6 +6,7 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 
 static int cpu_status_all(void)
 {
index e3aae5e9f9bf77655a9a21d604b3285efce4ded5..155c9f1bb732d43d643c2b5f88327980e7fc81e4 100644 (file)
@@ -6,6 +6,7 @@
 #include <errno.h>
 #include <tee.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 
 #define TA_HELLO_WORLD_CMD_INC_VALUE 0
 /* This needs to match the UUID of the Hello World TA. */
index 52aa26c78d2f9b8b81d5390adc771700b1569e6d..f2757146bbafe400651d40373496ae9dedfc12af 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <command.h>
 #include <hash.h>
+#include <linux/string.h>
 #include <u-boot/sha1.h>
 
 int do_sha1sum(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
index 7616fed7556667448c532d130101483e4fea0066..a8c896e0c5ee9a1c155acf2694b09ab44dff8f5f 100644 (file)
@@ -9,6 +9,7 @@
 #include <time.h>
 #include <vsprintf.h>
 #include <linux/delay.h>
+#include <linux/string.h>
 
 static int do_sleep(struct cmd_tbl *cmdtp, int flag, int argc,
                    char *const argv[])
index 3a4d885e37e1fd74c4a265f17f9e25053d72f880..fa04bb05ca428a7b62f2469d5dac452de924039e 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/arm-smccc.h>
 #include <linux/compiler.h>
 #include <linux/psci.h>
+#include <linux/string.h>
 
 static int do_call(struct cmd_tbl *cmdtp, int flag, int argc,
                   char *const argv[])
index e7ff4a0615894dedcd8ae29ef2d1381e1f974d3b..78e9beba5bf331e54fb6a30d52cec95abfe3edf8 100644 (file)
@@ -4,6 +4,7 @@
  */
 
 #include <command.h>
+#include <linux/string.h>
 
 static int do_test_stackprot_fail(struct cmd_tbl *cmdtp, int flag, int argc,
                                  char *const argv[])
index 5bcb0f2b567cd4526116d6c3fdd31482eb18155b..beac2a6e6b3a59214999660296a25e1daf16268d 100644 (file)
@@ -9,6 +9,7 @@
 #include <config.h>
 #include <command.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 
 static char *start_addr, *last_addr;
 
index b4c3eabf9f604279285e941f82399c5c89a38215..4774d296487496b437c3898b550fc513a9b621e4 100644 (file)
@@ -8,6 +8,7 @@
 #include <fs.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 
 #define OP_INVALID     0
 #define OP_NOT         1
index 04fcd84ac6a65a116d113452e491c7a2f1989f74..427309e108df436113f73dead64224619a576de5 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <command.h>
 #include <time.h>
+#include <linux/string.h>
 
 static int do_timer(struct cmd_tbl *cmdtp, int flag, int argc,
                    char *const argv[])
index 6e21fbb1685ceea926427691baa43599753e60f9..790dab50f183146cbded44a03b38d1e3e75d2475 100644 (file)
--- a/cmd/ufs.c
+++ b/cmd/ufs.c
@@ -8,6 +8,7 @@
 #include <command.h>
 #include <ufs.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 
 static int do_ufs(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
 {
index 289865515ef5265903f34c1bcfb86ff51e84b379..91130453039db2ac03ba4eba8fffebaf75dbadda 100644 (file)
@@ -6,6 +6,7 @@
 #include <command.h>
 #include <log.h>
 #include <vsprintf.h>
+#include <linux/string.h>
 #include <asm/msr.h>
 #include <asm/mp.h>
 #include <asm/mtrr.h>
index 596e0156389995a1274c96ae9d899cb01acd5fba..9d386fc32e5a8e61aca31b67176e178be902fa28 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <tpm-v1.h>
 #include <tpm-v2.h>
+#include <linux/string.h>
 #include <asm/unaligned.h>
 #include "sandbox_common.h"