All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Alexandru Gagniuc <mr.nuke.me@gmail.com>,
	Bin Meng <bmeng.cn@gmail.com>, Tom Rini <trini@konsulko.com>,
	Simon Glass <sjg@chromium.org>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Marek Vasut <marex@denx.de>
Subject: [PATCH v4 15/15] image: Remove ifdefs around image_setup_linux() el at
Date: Sat, 25 Sep 2021 07:03:20 -0600	[thread overview]
Message-ID: <20210925070255.v4.15.I2e3e7a80f542eb6c12c14b6a5678e6e1a0df1614@changeid> (raw)
In-Reply-To: <20210925130320.7824-1-sjg@chromium.org>

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 <sjg@chromium.org>
---

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


  parent reply	other threads:[~2021-09-25 13:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-25 13:03 [PATCH v4 00/15] image: A partial series for the image clean-up Simon Glass
2021-09-25 13:03 ` [PATCH v4 01/15] lib: Add memdup() Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 02/15] Add support for an owned buffer Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 03/15] compiler: Add a comment to host_build() Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 04/15] zstd: Create a function for use from U-Boot Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 05/15] btrfs: Use U-Boot API for decompression Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 06/15] image: Avoid switch default in image_decomp() Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 07/15] image: Update zstd to avoid reporting error twice Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 08/15] gzip: Avoid use of u64 Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 09/15] image: Update image_decomp() to avoid ifdefs Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 10/15] image: Split board code out into its own file Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 11/15] image: Fix up checkpatch warnings in image-board.c Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 12/15] image: Split host code out into its own file Simon Glass
2021-10-09  1:38   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 13/15] image: Create a function to do manual relocation Simon Glass
2021-10-09  1:39   ` Tom Rini
2021-09-25 13:03 ` [PATCH v4 14/15] image: Avoid #ifdefs for " Simon Glass
2021-10-09  1:39   ` Tom Rini
2021-09-25 13:03 ` Simon Glass [this message]
2021-10-09  1:39   ` [PATCH v4 15/15] image: Remove ifdefs around image_setup_linux() el at Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210925070255.v4.15.I2e3e7a80f542eb6c12c14b6a5678e6e1a0df1614@changeid \
    --to=sjg@chromium.org \
    --cc=bmeng.cn@gmail.com \
    --cc=joe.hershberger@ni.com \
    --cc=marex@denx.de \
    --cc=mr.nuke.me@gmail.com \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    --cc=xypron.glpk@gmx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.