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>
This commit is contained in:
Tom Rini 2023-12-14 13:16:53 -05:00
parent 071cf2767f
commit bc9c7ccc87
3 changed files with 5 additions and 15 deletions

View file

@ -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>

View file

@ -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>

View file

@ -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] = {