Message ID | 20200421072850.4970-19-sr@denx.de |
---|---|
State | Accepted |
Commit | 5ae526b61f6a8832ac72c4aeed6e652887ccbbd0 |
Headers | show |
Series | Refactor the architecture parts of mt7628 | expand |
Am 21.04.20 um 09:28 schrieb Stefan Roese: > Use IS_ENABLED() instead of #ifdef CONFIG_ to remove one #ifdef. > > No functional change intended. > > Signed-off-by: Stefan Roese <sr at denx.de> > Cc: Daniel Schwierzeck <daniel.schwierzeck at gmail.com> > Cc: Weijie Gao <weijie.gao at mediatek.com> > Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com> > --- > Changes in v7: > - None > > Changes in v6: > - New patch > > common/spl/spl_legacy.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck at gmail.com>
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) { /*
Use IS_ENABLED() instead of #ifdef CONFIG_ to remove one #ifdef. No functional change intended. Signed-off-by: Stefan Roese <sr at denx.de> Cc: Daniel Schwierzeck <daniel.schwierzeck at gmail.com> Cc: Weijie Gao <weijie.gao at mediatek.com> Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com> --- Changes in v7: - None Changes in v6: - New patch common/spl/spl_legacy.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)