From patchwork Wed Apr 8 08:09:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 237373 List-Id: U-Boot discussion From: sr at denx.de (Stefan Roese) Date: Wed, 8 Apr 2020 10:09:34 +0200 Subject: [PATCH 18/26 v6] spl: spl_legacy: Use IS_ENABLED() to remove #ifdef In-Reply-To: <20200408080942.7694-1-sr@denx.de> References: <20200408080942.7694-1-sr@denx.de> Message-ID: <20200408080942.7694-19-sr@denx.de> Use IS_ENABLED() instead of #ifdef CONFIG_ to remove one #ifdef. No functional change intended. Signed-off-by: Stefan Roese Cc: Weijie Gao Cc: Simon Goldschmidt --- Changes in v6: - New patch common/spl/spl_legacy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) { /*