From: Stefan Roese Date: Tue, 21 Apr 2020 07:28:42 +0000 (+0200) Subject: spl: spl_legacy: Use IS_ENABLED() to remove #ifdef X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=5ae526b61f6a8832ac72c4aeed6e652887ccbbd0;p=u-boot.git spl: spl_legacy: Use IS_ENABLED() to remove #ifdef Use IS_ENABLED() instead of #ifdef CONFIG_ to remove one #ifdef. No functional change intended. Signed-off-by: Stefan Roese Cc: Daniel Schwierzeck Cc: Weijie Gao Cc: Simon Goldschmidt Reviewed-by: Daniel Schwierzeck --- diff --git a/common/spl/spl_legacy.c b/common/spl/spl_legacy.c index 33f3587e3b..772135193e 100644 --- a/common/spl/spl_legacy.c +++ b/common/spl/spl_legacy.c @@ -11,13 +11,12 @@ int spl_parse_legacy_header(struct spl_image_info *spl_image, { u32 header_size = sizeof(struct image_header); -#ifdef CONFIG_SPL_LEGACY_IMAGE_CRC_CHECK /* check uImage header CRC */ - if (!image_check_hcrc(header)) { + if (IS_ENABLED(CONFIG_SPL_LEGACY_IMAGE_CRC_CHECK) && + !image_check_hcrc(header)) { puts("SPL: Image header CRC check failed!\n"); return -EINVAL; } -#endif if (spl_image->flags & SPL_COPY_PAYLOAD_ONLY) { /*