aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-12-14 13:16:53 -0500
committerTom Rini <trini@konsulko.com>2023-12-21 08:54:37 -0500
commitbc9c7ccc87bee1659a586171eeb19c7474023095 (patch)
tree37a021e9de1700bd4f44396168f4b67759ee0351
parent071cf2767f832ec89eff40a476903d4ac5240dcf (diff)
downloadu-boot-bc9c7ccc87bee1659a586171eeb19c7474023095.zip
u-boot-bc9c7ccc87bee1659a586171eeb19c7474023095.tar.gz
u-boot-bc9c7ccc87bee1659a586171eeb19c7474023095.tar.bz2
lib/sha*.c: Update header list
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 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. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r--lib/sha1.c7
-rw-r--r--lib/sha256.c7
-rw-r--r--lib/sha512.c6
3 files changed, 5 insertions, 15 deletions
diff --git a/lib/sha1.c b/lib/sha1.c
index 8d07407..7ef536f 100644
--- a/lib/sha1.c
+++ b/lib/sha1.c
@@ -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>
diff --git a/lib/sha256.c b/lib/sha256.c
index 4d26aea..665ba6f 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -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>
diff --git a/lib/sha512.c b/lib/sha512.c
index fbe8d5f..ffe2c5c 100644
--- a/lib/sha512.c
+++ b/lib/sha512.c
@@ -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] = {