From patchwork Mon May 3 23:11:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1473527 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.a=rsa-sha256 header.s=google header.b=bXm6FOXo; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FYzTg4RFLz9sCD for ; Tue, 4 May 2021 09:20:07 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AFE5F82E33; Tue, 4 May 2021 01:18:38 +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="bXm6FOXo"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id A498C82E33; Tue, 4 May 2021 01:18:30 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from mail-io1-xd29.google.com (mail-io1-xd29.google.com [IPv6:2607:f8b0:4864:20::d29]) (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 7736A82B3E for ; Tue, 4 May 2021 01:12:02 +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-io1-xd29.google.com with SMTP id t3so280446iol.5 for ; Mon, 03 May 2021 16:12:02 -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=nK2PJ4dbMV2OMoj9NsBzwOBmb3n3c7ST+hWzYgHidcU=; b=bXm6FOXoM2YL/DE/jPwic6NeS2lmMRHiCedIgROXF9N+b/XIVVPtRZTL0gQfQNZjHr Z1m5Xe4jROCYtzKvnpYJmTnPcR3nIHbT/ogxrhi7NMAUvj4t/Fq+holkJtb6GEmJs4VU QNuRSahLiebhTNKXweN9wEl6Y+1UA2UlL6bIM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nK2PJ4dbMV2OMoj9NsBzwOBmb3n3c7ST+hWzYgHidcU=; b=PYyxXJuU9GyziXgoSttuhPEXS6a2QrSHAI/ktd5jW7qIrY0jHJ0eutRSUfcCvyJBMf 9Rs65/xkFKh4bmL7Jd1IT1cuQrrwIKKGMX52+l8KHAgW6YeOSK80syW5Vk04qq9cxQRI 0+4WkwVJdMgz0EPP3/qSU1kKjmsZj6CdjDbqEwGqDNv89v3mQ5VfmgpMtZlFCLS3oKia x1bExOxBiORtITacz5dI8NEuSgx5cQnNQLLqk33zBTsf+4ogT6Iwcd08QRGshINvso3s J6R07vhdaBuhhHdy1wFRKQpfugkhfASFEKEtEpclpqwKBeLE07RlSkhi+DxT38wHa8Au Gp+w== X-Gm-Message-State: AOAM531A1JSDXodK+9tA3XeEy+MUDHZmGeA6jThBU49ANx8ULFc0NlKa smT47OV2/J6PiMQBF9cj7rt2C0mET5bvEg== X-Google-Smtp-Source: ABdhPJwrGLd5kn9y++SJ5QA/hJwtS9AVexQXJLFfNxVvvZaOJoV0nNb3mACC5pj6DFTqNbRzmKE0nQ== X-Received: by 2002:a5e:940f:: with SMTP id q15mr16313308ioj.197.1620083520905; Mon, 03 May 2021 16:12:00 -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 o6sm422727ioa.21.2021.05.03.16.12.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 16:12:00 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Heinrich Schuchardt , Bin Meng , Robert Marko , Andre Przywara , Masahiro Yamada , Simon Glass , Joe Hershberger , Marek Vasut , Naoki Hayama , Stefan Roese , Tero Kristo Subject: [PATCH 14/49] image: Remove ifdefs around image_setup_linux() el at Date: Mon, 3 May 2021 17:11:01 -0600 Message-Id: <20210503171001.14.I2e3e7a80f542eb6c12c14b6a5678e6e1a0df1614@changeid> X-Mailer: git-send-email 2.31.1.527.g47e6f16901-goog In-Reply-To: <20210503231136.744283-1-sjg@chromium.org> References: <20210503231136.744283-1-sjg@chromium.org> MIME-Version: 1.0 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.102.4 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 --- (no changes since v1) 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 b46062c86b9..0f41ede1e98 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) {