projects
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f2cbe6e
)
fdt: Drop the confusing casts in lmb_free()
author
Simon Glass
<sjg@chromium.org>
Sun, 12 Nov 2023 15:27:49 +0000
(08:27 -0700)
committer
Tom Rini
<trini@konsulko.com>
Wed, 13 Dec 2023 23:39:05 +0000
(18:39 -0500)
Just use map_to_sysmem() instead of all the casting.
Signed-off-by: Simon Glass <sjg@chromium.org>
boot/image-fdt.c
patch
|
blob
|
history
diff --git
a/boot/image-fdt.c
b/boot/image-fdt.c
index 173ddb6e074acfbd6ec3e8e8bdc1b9d5335dc460..3e007d2b898615346cf8fdd1893a8cf6487b9a8e 100644
(file)
--- a/
boot/image-fdt.c
+++ b/
boot/image-fdt.c
@@
-656,8
+656,7
@@
int image_setup_libfdt(struct bootm_headers *images, void *blob,
/* Delete the old LMB reservation */
if (lmb)
- lmb_free(lmb, (phys_addr_t)(u32)(uintptr_t)blob,
- (phys_size_t)fdt_totalsize(blob));
+ lmb_free(lmb, map_to_sysmem(blob), fdt_totalsize(blob));
ret = fdt_shrink_to_minimum(blob, 0);
if (ret < 0)
@@
-666,7
+665,7
@@
int image_setup_libfdt(struct bootm_headers *images, void *blob,
/* Create a new LMB reservation */
if (lmb)
- lmb_reserve(lmb,
(ulong)blob
, of_size);
+ lmb_reserve(lmb,
map_to_sysmem(blob)
, of_size);
if (!ft_verify_fdt(blob))
goto err;