We already have a host Kconfig for SHA1. Use CONFIG_IS_ENABLED(SHA1) directly in the code shared with the host build, so we can drop the unnecessary indirection.
Signed-off-by: Simon Glass <s...@chromium.org> --- (no changes since v1) common/image-fit.c | 2 +- include/image.h | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/common/image-fit.c b/common/image-fit.c index 19a2d3c91df..96794074b63 100644 --- a/common/image-fit.c +++ b/common/image-fit.c @@ -1218,7 +1218,7 @@ int calculate_hash(const void *data, int data_len, const char *algo, CHUNKSZ_CRC32); *((uint32_t *)value) = cpu_to_uimage(*((uint32_t *)value)); *value_len = 4; - } else if (IMAGE_ENABLE_SHA1 && strcmp(algo, "sha1") == 0) { + } else if (CONFIG_IS_ENABLED(SHA1) && strcmp(algo, "sha1") == 0) { sha1_csum_wd((unsigned char *)data, data_len, (unsigned char *)value, CHUNKSZ_SHA1); *value_len = 20; diff --git a/include/image.h b/include/image.h index 9f665a597b0..f5ff77bf0ca 100644 --- a/include/image.h +++ b/include/image.h @@ -46,17 +46,6 @@ struct fdt_region; #include <hash.h> #include <linux/libfdt.h> #include <fdt_support.h> -# ifdef CONFIG_SPL_BUILD -# ifdef CONFIG_SPL_FIT_SHA1 -# define IMAGE_ENABLE_SHA1 1 -# endif -# else -# define IMAGE_ENABLE_SHA1 1 -# endif - -#ifndef IMAGE_ENABLE_SHA1 -#define IMAGE_ENABLE_SHA1 0 -#endif #if defined(CONFIG_FIT_SHA256) || \ defined(CONFIG_SPL_FIT_SHA256) -- 2.31.1.527.g47e6f16901-goog