From: John Keeping Date: Wed, 19 May 2021 14:05:53 +0000 (+0100) Subject: spl: use CONFIG_IS_ENABLED(LOAD_FIT_FULL) X-Git-Url: http://git.dujemihanovic.xyz/img/static/%7B%7B%20%24.Site.BaseURL%20%7D%7Dposts/index.xml?a=commitdiff_plain;h=674afa6b3588dafe02b99406278ed81216fbefcb;p=u-boot.git spl: use CONFIG_IS_ENABLED(LOAD_FIT_FULL) It's possible that LOAD_FIT_FULL will have different values for TPL and SPL, in which case just checking CONFIG_SPL_LOAD_FIT_FULL causes this to be compiled in to the TPL even though functions and struct members it depends on are not. Use CONFIG_IS_ENABLED() to ensure the correct TPL/SPL variant is checked. Signed-off-by: John Keeping Reviewed-by: Bin Meng Reviewed-by: Simon Glass --- diff --git a/common/spl/spl.c b/common/spl/spl.c index 3b96f2fc31..3ec16d0de6 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -200,7 +200,7 @@ void spl_set_header_raw_uboot(struct spl_image_info *spl_image) spl_image->name = "U-Boot"; } -#ifdef CONFIG_SPL_LOAD_FIT_FULL +#if CONFIG_IS_ENABLED(LOAD_FIT_FULL) /* Parse and load full fitImage in SPL */ static int spl_load_fit_image(struct spl_image_info *spl_image, const struct image_header *header) @@ -307,7 +307,7 @@ __weak int spl_parse_legacy_header(struct spl_image_info *spl_image, int spl_parse_image_header(struct spl_image_info *spl_image, const struct image_header *header) { -#ifdef CONFIG_SPL_LOAD_FIT_FULL +#if CONFIG_IS_ENABLED(LOAD_FIT_FULL) int ret = spl_load_fit_image(spl_image, header); if (!ret)