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: Sean Edmond <seanedmond@microsoft.com>,
	Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
	Daniel Schwierzeck <daniel.schwierzeck@gmail.com>,
	Eddie James <eajames@linux.ibm.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Marek Vasut <marek.vasut+renesas@mailbox.org>,
	Mattijs Korpershoek <mkorpershoek@baylibre.com>,
	Safae Ouajih <souajih@baylibre.com>,
	Sean Anderson <sean.anderson@seco.com>,
	Tobias Waldekranz <tobias@waldekranz.com>
Subject: [PATCH 1/7] boot: Drop size parameter from image_setup_libfdt()
Date: Sun, 12 Nov 2023 08:27:44 -0700	[thread overview]
Message-ID: <20231112152754.130399-2-sjg@chromium.org> (raw)
In-Reply-To: <20231112152754.130399-1-sjg@chromium.org>

The of_size parameter is not used, so remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/mips/lib/bootm.c         | 4 ++--
 boot/image-board.c            | 2 +-
 boot/image-fdt.c              | 3 ++-
 cmd/bootefi.c                 | 2 +-
 include/image.h               | 3 +--
 lib/efi_loader/efi_dt_fixup.c | 2 +-
 6 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index d6d2f7d9d031..f1cff691f4fe 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -246,8 +246,8 @@ static int boot_setup_fdt(struct bootm_headers *images)
 {
 	images->initrd_start = virt_to_phys((void *)images->initrd_start);
 	images->initrd_end = virt_to_phys((void *)images->initrd_end);
-	return image_setup_libfdt(images, images->ft_addr, images->ft_len,
-		&images->lmb);
+
+	return image_setup_libfdt(images, images->ft_addr, &images->lmb);
 }
 
 static void boot_prep_linux(struct bootm_headers *images)
diff --git a/boot/image-board.c b/boot/image-board.c
index d500da1b4b91..893eaf935137 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -959,7 +959,7 @@ int image_setup_linux(struct bootm_headers *images)
 	}
 
 	if (CONFIG_IS_ENABLED(OF_LIBFDT) && of_size) {
-		ret = image_setup_libfdt(images, *of_flat_tree, of_size, lmb);
+		ret = image_setup_libfdt(images, *of_flat_tree, lmb);
 		if (ret)
 			return ret;
 	}
diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index f10200f64743..54d219da7da1 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -604,12 +604,13 @@ __weak int arch_fixup_fdt(void *blob)
 }
 
 int image_setup_libfdt(struct bootm_headers *images, void *blob,
-		       int of_size, struct lmb *lmb)
+		       struct lmb *lmb)
 {
 	ulong *initrd_start = &images->initrd_start;
 	ulong *initrd_end = &images->initrd_end;
 	int ret = -EPERM;
 	int fdt_ret;
+	int of_size;
 
 	if (fdt_root(blob) < 0) {
 		printf("ERROR: root node setup failed\n");
diff --git a/cmd/bootefi.c b/cmd/bootefi.c
index 20e5c94a33a4..2809f599011f 100644
--- a/cmd/bootefi.c
+++ b/cmd/bootefi.c
@@ -309,7 +309,7 @@ efi_status_t efi_install_fdt(void *fdt)
 		return EFI_OUT_OF_RESOURCES;
 	}
 
-	if (image_setup_libfdt(&img, fdt, 0, NULL)) {
+	if (image_setup_libfdt(&img, fdt, NULL)) {
 		log_err("ERROR: failed to process device tree\n");
 		return EFI_LOAD_ERROR;
 	}
diff --git a/include/image.h b/include/image.h
index 2e3cf839ee36..c7ec83b4e638 100644
--- a/include/image.h
+++ b/include/image.h
@@ -953,12 +953,11 @@ int image_decomp(int comp, ulong load, ulong image_start, int type,
  *
  * @images:	Images information
  * @blob:	FDT to update
- * @of_size:	Size of the FDT
  * @lmb:	Points to logical memory block structure
  * Return: 0 if ok, <0 on failure
  */
 int image_setup_libfdt(struct bootm_headers *images, void *blob,
-		       int of_size, struct lmb *lmb);
+		       struct lmb *lmb);
 
 /**
  * Set up the FDT to use for booting a kernel
diff --git a/lib/efi_loader/efi_dt_fixup.c b/lib/efi_loader/efi_dt_fixup.c
index 838023c78ff7..a0c889cf9867 100644
--- a/lib/efi_loader/efi_dt_fixup.c
+++ b/lib/efi_loader/efi_dt_fixup.c
@@ -173,7 +173,7 @@ efi_dt_fixup(struct efi_dt_fixup_protocol *this, void *dtb,
 		}
 
 		fdt_set_totalsize(dtb, *buffer_size);
-		if (image_setup_libfdt(&img, dtb, 0, NULL)) {
+		if (image_setup_libfdt(&img, dtb, NULL)) {
 			log_err("failed to process device tree\n");
 			ret = EFI_INVALID_PARAMETER;
 			goto out;
-- 
2.42.0.869.gea05f2083d-goog


  reply	other threads:[~2023-11-12 15:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-12 15:27 [PATCH 0/7] fdt: Move towards using ofnode for devicetree fixups Simon Glass
2023-11-12 15:27 ` Simon Glass [this message]
2023-11-12 18:22   ` [PATCH 1/7] boot: Drop size parameter from image_setup_libfdt() Tom Rini
2023-12-13 20:39   ` Simon Glass
2023-11-12 15:27 ` [PATCH 2/7] fdt: Check for a valid fdt in oftree_ensure() Simon Glass
2023-11-12 15:27 ` [PATCH 3/7] fdt: Improve the comment for fdt_shrink_to_minimum() Simon Glass
2023-11-12 15:27 ` [PATCH 4/7] fdt: ppc: Drop extra size for ramdisk Simon Glass
2023-11-12 18:22   ` Tom Rini
2023-12-13 20:39   ` Simon Glass
2023-11-12 15:27 ` [PATCH 5/7] boot: Move adding initrd earlier in image_setup_libfdt() Simon Glass
2023-11-12 15:27 ` [PATCH 6/7] fdt: Drop the confusing casts in lmb_free() Simon Glass
2023-11-12 15:27 ` [PATCH 7/7] fdt: Move ft_verify_fdt() before the final fixups Simon Glass
2023-12-13 20:39 ` [PATCH 6/7] fdt: Drop the confusing casts in lmb_free() Simon Glass
2023-12-13 20:39 ` [PATCH 5/7] boot: Move adding initrd earlier in image_setup_libfdt() Simon Glass

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=20231112152754.130399-2-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=daniel.schwierzeck@gmail.com \
    --cc=eajames@linux.ibm.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=mkorpershoek@baylibre.com \
    --cc=sean.anderson@seco.com \
    --cc=seanedmond@microsoft.com \
    --cc=souajih@baylibre.com \
    --cc=tobias@waldekranz.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.