From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B3B5FECAAA2 for ; Sun, 28 Aug 2022 18:34:03 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 938AA84916; Sun, 28 Aug 2022 20:33:39 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Ic5akH4i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5F855845E1; Sun, 28 Aug 2022 20:33:23 +0200 (CEST) Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 3E4B584925 for ; Sun, 28 Aug 2022 20:33:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-oi1-x22c.google.com with SMTP id s199so8153642oie.3 for ; Sun, 28 Aug 2022 11:33:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=SzYURdUuNnbcHwSUbGgisBBP1YFrxVjZKkFNraL/l/I=; b=Ic5akH4iXKuyxUV+gccLahno25ZCBiJbKtAfXQWFCtczmGlr7MKqsg1c6KNwzBDrdy TPJD+S3Xl/P7KN0UFrhLwQNOTFr3mb1xGM66A1Rxn1WVonDvJ5+jQcmkJ1FkvF0n5Cen RriKt3BhwoKmu/uxbEY4Rl89iEnhAvEUzAVzY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=SzYURdUuNnbcHwSUbGgisBBP1YFrxVjZKkFNraL/l/I=; b=oUkQcOmlS1EaHPIN47ixrGxBRQe8CsTW89f+kYN8Oi7o/pBoaJcC3wX7FqW8LfodF1 c0yD2/uAohvY2uI6Thig2Avrs4lLob9jvsYHmBzx3Zx0ofhqzOaeu01VOjt1sWxztSE8 xMhAXzoQrJ6hwGwXMkGHKLB/RbsC4tkLGlRj6xpCANlPMqfcATk230m6O13le8aO14xQ KA/QjtgXsIFRy3+fQS6BHsXjeKxVtr2tMmyrOZ517b/dokmrFxooZpay79R7vQB7KqvM nmkh2yIxfXAcV/TW9f4ETku66no0wTYvfDb5zzLoEJgTrbVAq9tq+33zBFBuIOqpOSEo 5fqQ== X-Gm-Message-State: ACgBeo1cy7TRl6sgAyftiqyeMj4vCLAeAQO47xHvakDa9ot50OW+n2Yx 3DssFQEiLUZnwIUaakxgPFriZRL0okPaXQ== X-Google-Smtp-Source: AA6agR6EqvZryBoLEe1L1osJIKqDBQNE0wIMU/0oVmqL78oNOKge4vrXbSyBZSGp08sCnJWcIUXbqQ== X-Received: by 2002:a05:6808:1491:b0:343:7543:1a37 with SMTP id e17-20020a056808149100b0034375431a37mr5959157oiw.106.1661711594481; Sun, 28 Aug 2022 11:33:14 -0700 (PDT) Received: from sjg1.roam.corp.google.com (c-67-190-102-125.hsd1.co.comcast.net. [67.190.102.125]) by smtp.gmail.com with ESMTPSA id 91-20020a9d0de4000000b006339b36127dsm4299771ots.3.2022.08.28.11.33.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Aug 2022 11:33:14 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Neil Armstrong , Simon Glass , Alexandru Gagniuc , Artem Lapkin , Joe Hershberger , Leo Yu-Chi Liang , Marek Vasut , Michal Simek Subject: [PATCH 6/8] image: Drop remaining FIT #ifdef Date: Sun, 28 Aug 2022 12:32:51 -0600 Message-Id: <20220828183253.822815-7-sjg@chromium.org> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog In-Reply-To: <20220828183253.822815-1-sjg@chromium.org> References: <20220828183253.822815-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean Drop the last one of these, by using a done_select variable to control whether to fall back to using 'select' as a hex value. Note that the indentation is not adjusted, to make this easier to review. Signed-off-by: Simon Glass --- boot/image-board.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/boot/image-board.c b/boot/image-board.c index 8858a2fe126..7c0948b592a 100644 --- a/boot/image-board.c +++ b/boot/image-board.c @@ -324,12 +324,13 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch, { const char *fit_uname_config; const char *fit_uname_ramdisk; + bool done_select = !select; bool done = false; int rd_noffset; ulong rd_addr; char *buf; -#if CONFIG_IS_ENABLED(FIT) + if (CONFIG_IS_ENABLED(FIT)) { fit_uname_config = images->fit_uname_cfg; fit_uname_ramdisk = NULL; @@ -350,21 +351,21 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch, &rd_addr, &fit_uname_config)) { debug("* ramdisk: config '%s' from image at 0x%08lx\n", fit_uname_config, rd_addr); + done_select = true; } else if (fit_parse_subimage(select, default_addr, &rd_addr, &fit_uname_ramdisk)) { debug("* ramdisk: subimage '%s' from image at 0x%08lx\n", fit_uname_ramdisk, rd_addr); - } else -#endif - { + done_select = true; + } + } + } + if (!done_select) { rd_addr = hextoul(select, NULL); debug("* ramdisk: cmdline image address = 0x%08lx\n", rd_addr); - } -#if CONFIG_IS_ENABLED(FIT) - } -#endif + } if (CONFIG_IS_ENABLED(FIT) && !select) { /* use FIT configuration provided in first bootm * command argument. If the property is not defined, -- 2.37.2.672.g94769d06f0-goog