Hi Simon,

On 7/21/24 5:25 PM, Simon Glass wrote:
This function has a number of unnecessary #ifdefs so remove them.

Signed-off-by: Simon Glass <s...@chromium.org>
Reviewed-by: Sean Anderson <sean...@gmail.com>
---

(no changes since v1)

  common/spl/spl.c | 22 +++++++++++-----------
  1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/common/spl/spl.c b/common/spl/spl.c
index 6f4a8bfb3f4..02567e766f1 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -308,8 +308,10 @@ int spl_parse_image_header(struct spl_image_info 
*spl_image,
                ret = spl_parse_legacy_header(spl_image, header);
                if (ret)
                        return ret;
-       } else {
-#ifdef CONFIG_SPL_PANIC_ON_RAW_IMAGE
+               return 0;
+       }
+
+       if (IS_ENABLED(CONFIG_SPL_PANIC_ON_RAW_IMAGE)) {
                /*
                 * CONFIG_SPL_PANIC_ON_RAW_IMAGE is defined when the
                 * code which loads images in SPL cannot guarantee that
@@ -319,10 +321,9 @@ int spl_parse_image_header(struct spl_image_info 
*spl_image,
                 * is bad, and thus should be skipped silently.
                 */
                panic("** no mkimage signature but raw image not supported");
-#endif
+       }
-#if CONFIG_IS_ENABLED(OS_BOOT)
-#if defined(CONFIG_CMD_BOOTI)
+       if (CONFIG_IS_ENABLED(OS_BOOT) && IS_ENABLED(CONFIG_CMD_BOOTI)) {

Ah, I see. Done in this commit :) Ignore comment on patch 2 then :)

Reviewed-by: Quentin Schulz <quentin.sch...@cherry.de>

Thanks!
Quentin

Reply via email to