]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
boot: Drop size parameter from image_setup_libfdt()
authorSimon Glass <sjg@chromium.org>
Sun, 12 Nov 2023 15:27:44 +0000 (08:27 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 13 Dec 2023 23:39:05 +0000 (18:39 -0500)
The of_size parameter is not used, so remove it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
arch/mips/lib/bootm.c
boot/image-board.c
boot/image-fdt.c
cmd/bootefi.c
include/image.h
lib/efi_loader/efi_dt_fixup.c

index d6d2f7d9d031451cdfec61de4b73d8e61e31202a..f1cff691f4fe363aeb59b66c0a74dcde6714fb60 100644 (file)
@@ -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)
index bb0ca9d7f22f39970437800b00fef12682d6afc7..75f6906cd564b90903a7e9834b6fc7d582f9bde5 100644 (file)
@@ -908,7 +908,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;
        }
index 08fca08b710a82cc2a7cb65848aa5b71d766771d..07e50322325c034eb5f3d26a808748898f693cc8 100644 (file)
@@ -575,12 +575,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");
index 4d74969ad6211fa9d6e2b2e3a1358db0750b9b5b..2ed29ad6bb81749aa597ed4d8e8c03ab01a064a7 100644 (file)
@@ -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;
        }
index b89912a50f98db2c8c27131a7144c7477ea6f443..9f43518cef8feabb270fcc143beb9f7aa09fc809 100644 (file)
@@ -1028,12 +1028,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
index 838023c78ff7a83d1eb132a1cbab40f633498175..a0c889cf986754f849d6b9198ed71dc7cf2c5024 100644 (file)
@@ -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;