From: Tom Rini Date: Sat, 27 Apr 2024 14:11:03 +0000 (-0600) Subject: env: Remove and add needed includes X-Git-Url: http://git.dujemihanovic.xyz/posts?a=commitdiff_plain;h=0f92fa4560335f04858bfc9881e0bc6bbb756b3f;p=u-boot.git env: Remove and add needed includes Remove from all "env/" files and when needed add missing include files directly. Signed-off-by: Tom Rini --- diff --git a/env/attr.c b/env/attr.c index a958c71482..fed5b212e2 100644 --- a/env/attr.c +++ b/env/attr.c @@ -4,13 +4,13 @@ * Joe Hershberger, National Instruments, joe.hershberger@ni.com */ +#include #ifdef USE_HOSTCC /* Eliminate "ANSI does not permit..." warnings */ #include -#include #include #else -#include #include +#include #endif #include diff --git a/env/callback.c b/env/callback.c index 98ddba035e..b7cbccd117 100644 --- a/env/callback.c +++ b/env/callback.c @@ -4,7 +4,6 @@ * Joe Hershberger, National Instruments, joe.hershberger@ni.com */ -#include #include #include #include diff --git a/env/common.c b/env/common.c index 48a565107c..d8c276dddf 100644 --- a/env/common.c +++ b/env/common.c @@ -7,7 +7,6 @@ * Andreas Heppel */ -#include #include #include #include diff --git a/env/eeprom.c b/env/eeprom.c index 7ce7e9972b..b290b1013e 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -7,7 +7,6 @@ * Andreas Heppel */ -#include #include #include #include diff --git a/env/env.c b/env/env.c index bae3f6482a..bcc189e14d 100644 --- a/env/env.c +++ b/env/env.c @@ -4,13 +4,13 @@ * Written by Simon Glass */ -#include #include #include #include #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; diff --git a/env/ext4.c b/env/ext4.c index da26705b8d..eb16568bd4 100644 --- a/env/ext4.c +++ b/env/ext4.c @@ -18,7 +18,6 @@ * Manjunatha C Achar */ -#include #include #include diff --git a/env/fat.c b/env/fat.c index 3172130d75..2a40f12393 100644 --- a/env/fat.c +++ b/env/fat.c @@ -6,7 +6,6 @@ * Maximilian Schwerin */ -#include #include #include #include diff --git a/env/flags.c b/env/flags.c index e2866361df..233fd460d8 100644 --- a/env/flags.c +++ b/env/flags.c @@ -8,9 +8,9 @@ #include #include +#include #ifdef USE_HOSTCC /* Eliminate "ANSI does not permit..." warnings */ #include -#include #include "fw_env_private.h" #include "fw_env.h" #include @@ -18,7 +18,7 @@ #define env_get fw_getenv #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #else -#include +#include #include #endif diff --git a/env/flash.c b/env/flash.c index 1e75f8c004..1bd6e7003d 100644 --- a/env/flash.c +++ b/env/flash.c @@ -9,7 +9,6 @@ /* #define DEBUG */ -#include #include #include #include diff --git a/env/mmc.c b/env/mmc.c index 7afb733e89..776df0786b 100644 --- a/env/mmc.c +++ b/env/mmc.c @@ -5,7 +5,6 @@ /* #define DEBUG */ -#include #include #include diff --git a/env/nand.c b/env/nand.c index df300b1317..fef5697ec3 100644 --- a/env/nand.c +++ b/env/nand.c @@ -13,7 +13,6 @@ * Andreas Heppel */ -#include #include #include #include diff --git a/env/nowhere.c b/env/nowhere.c index 9ebc357dbd..326f27db2e 100644 --- a/env/nowhere.c +++ b/env/nowhere.c @@ -7,7 +7,6 @@ * Andreas Heppel */ -#include #include #include #include diff --git a/env/nvram.c b/env/nvram.c index 229c34f536..d49cd0f337 100644 --- a/env/nvram.c +++ b/env/nvram.c @@ -7,7 +7,6 @@ * Andreas Heppel */ -#include #include #include #include diff --git a/env/onenand.c b/env/onenand.c index 1faa2cb62a..8c349ef5ce 100644 --- a/env/onenand.c +++ b/env/onenand.c @@ -7,7 +7,6 @@ * Kyungmin Park */ -#include #include #include #include diff --git a/env/remote.c b/env/remote.c index 166bebf52b..0cc383c236 100644 --- a/env/remote.c +++ b/env/remote.c @@ -5,10 +5,10 @@ /* #define DEBUG */ -#include #include #include #include +#include #include #include diff --git a/env/sf.c b/env/sf.c index 8f5c03b00d..c747e175e3 100644 --- a/env/sf.c +++ b/env/sf.c @@ -8,7 +8,6 @@ * * (C) Copyright 2008 Atmel Corporation */ -#include #include #include #include diff --git a/env/ubi.c b/env/ubi.c index 445d34fedb..0c3e93c2bf 100644 --- a/env/ubi.c +++ b/env/ubi.c @@ -4,7 +4,6 @@ * Joe Hershberger */ -#include #include #include diff --git a/include/env_callback.h b/include/env_callback.h index 23bc650c16..8e500aaaf8 100644 --- a/include/env_callback.h +++ b/include/env_callback.h @@ -7,6 +7,7 @@ #ifndef __ENV_CALLBACK_H__ #define __ENV_CALLBACK_H__ +#include #include #include #include diff --git a/include/env_default.h b/include/env_default.h index 8ee500d170..076ffdd44e 100644 --- a/include/env_default.h +++ b/include/env_default.h @@ -7,6 +7,7 @@ * Andreas Heppel */ +#include #include #include diff --git a/include/env_flags.h b/include/env_flags.h index d785f87cdc..2476043b0e 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -7,6 +7,8 @@ #ifndef __ENV_FLAGS_H__ #define __ENV_FLAGS_H__ +#include + enum env_flags_vartype { env_flags_vartype_string, env_flags_vartype_decimal,