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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF25AC433F5 for ; Sat, 25 Sep 2021 13:06:58 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 29716610CF for ; Sat, 25 Sep 2021 13:06:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 29716610CF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 886928358E; Sat, 25 Sep 2021 15:05:53 +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="h+k4jozg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 7C9DD8350F; Sat, 25 Sep 2021 15:04:26 +0200 (CEST) Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (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 E3A1A8355D for ; Sat, 25 Sep 2021 15:03:55 +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-ot1-x336.google.com with SMTP id x33-20020a9d37a4000000b0054733a85462so17101610otb.10 for ; Sat, 25 Sep 2021 06:03:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=G5tvpQsAMy4UPyQopelhzx9+3/Ra/EVPk3U9IDx7VXI=; b=h+k4jozg/PRNnto+pfJO80otoamzfpMRXHIYWtVvTx5Wq/3JtkqDelI+qUp09Fkxsu lgxtgb2995UVz8GugRq+uAV5YXvTMfiSE/pqo3/0T0bX5Gc+ud0uICooL7pOYeKUPIdm hgrlok0ApG1lSIo33U+CBt2mXpvujoBk4pakg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=G5tvpQsAMy4UPyQopelhzx9+3/Ra/EVPk3U9IDx7VXI=; b=vnM73qlyvmFklyVsLh3QPSpCV8MDz9k6rEOsWYs/c4syvIQ6aLe3M2yGomROjFt7av Xtu17hkgTUGLXZpD5hoj3Q7G1mRLOtgYAUqv62P/4I2/Fral6jMkGHo54PvjQhOZMG/E IDgvck4ZTh7A8IgHyI5OcYXizS7J4CnwPFF8EvLzo5vscD36WjffCL0qlSeaC26k1l+i LzTx3POcOeg8+OPlat38l5BFD7zX1++Nqu6XsOlaMAORqABVTzUjqLV4I/KUcl2wXMe9 iVIfaVbsUH6OBraaF7zis4P9YwzAd+jxFpwkIzbVG4wxRgO73iGQlukqHEjzpOLNIRyN ybbg== X-Gm-Message-State: AOAM531uk35UHwg0g2By+YoSyFscQB3RFBBAimiY9c/9r+YoyAcFWN+A yCANNjjJ9wFXV0OEDSLJE8nwynuB7Ki6Ew== X-Google-Smtp-Source: ABdhPJxH31VssZmUAsOHpsCJujLFSSWuCkWzYqQAVN12Y5KI5nQVQGj8C5l5FWaZ6NfeQG7PYxcfmg== X-Received: by 2002:a9d:7499:: with SMTP id t25mr8436911otk.268.1632575034385; Sat, 25 Sep 2021 06:03:54 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id f61sm2770018otf.73.2021.09.25.06.03.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 Sep 2021 06:03:54 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Heinrich Schuchardt , Alexandru Gagniuc , Bin Meng , Tom Rini , Simon Glass , Joe Hershberger , Marek Vasut Subject: [PATCH v4 15/15] image: Remove ifdefs around image_setup_linux() el at Date: Sat, 25 Sep 2021 07:03:20 -0600 Message-Id: <20210925070255.v4.15.I2e3e7a80f542eb6c12c14b6a5678e6e1a0df1614@changeid> X-Mailer: git-send-email 2.33.0.685.g46640cef36-goog In-Reply-To: <20210925130320.7824-1-sjg@chromium.org> References: <20210925130320.7824-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 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.2 at phobos.denx.de X-Virus-Status: Clean Drop some more ifdefs in image-board.c and also the FPGA part of bootm.c which calls into it. Signed-off-by: Simon Glass --- Changes in v4: - Rebase to master Changes in v3: - Pick up only the first part of the original v2 series common/bootm.c | 16 ++++++++-------- common/image-board.c | 11 +++-------- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/common/bootm.c b/common/bootm.c index ea71522d0c9..fe17d1da9e5 100644 --- a/common/bootm.c +++ b/common/bootm.c @@ -296,15 +296,15 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start, #endif #if IMAGE_ENABLE_FIT -#if defined(CONFIG_FPGA) - /* find bitstreams */ - ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT, - NULL, NULL); - if (ret) { - printf("FPGA image is corrupted or invalid\n"); - return 1; + if (IS_ENABLED(CONFIG_FPGA)) { + /* find bitstreams */ + ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT, + NULL, NULL); + if (ret) { + printf("FPGA image is corrupted or invalid\n"); + return 1; + } } -#endif /* find all of the loadables */ ret = boot_get_loadable(argc, argv, &images, IH_ARCH_DEFAULT, diff --git a/common/image-board.c b/common/image-board.c index d0307d7625c..c13d0493ca3 100644 --- a/common/image-board.c +++ b/common/image-board.c @@ -814,7 +814,6 @@ int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images, } #endif -#ifdef CONFIG_SYS_BOOT_GET_CMDLINE /** * boot_get_cmdline - allocate and initialize kernel cmdline * @lmb: pointer to lmb handle, will be used for memory mgmt @@ -853,9 +852,7 @@ int boot_get_cmdline(struct lmb *lmb, ulong *cmd_start, ulong *cmd_end) return 0; } -#endif /* CONFIG_SYS_BOOT_GET_CMDLINE */ -#ifdef CONFIG_SYS_BOOT_GET_KBD /** * boot_get_kbd - allocate and initialize kernel copy of board info * @lmb: pointer to lmb handle, will be used for memory mgmt @@ -883,15 +880,14 @@ int boot_get_kbd(struct lmb *lmb, struct bd_info **kbd) debug("## kernel board info at 0x%08lx\n", (ulong)*kbd); -#if defined(DEBUG) && defined(CONFIG_CMD_BDI) - do_bdinfo(NULL, 0, 0, NULL); +#if defined(DEBUG) + if (IS_ENABLED(CONFIG_CMD_BDI) + do_bdinfo(NULL, 0, 0, NULL); #endif return 0; } -#endif /* CONFIG_SYS_BOOT_GET_KBD */ -#ifdef CONFIG_LMB int image_setup_linux(bootm_headers_t *images) { ulong of_size = images->ft_len; @@ -925,7 +921,6 @@ int image_setup_linux(bootm_headers_t *images) return 0; } -#endif /* CONFIG_LMB */ void genimg_print_size(uint32_t size) { -- 2.33.0.685.g46640cef36-goog