[PATCH 2/3] boot: fdt: Drop lmb_alloc*() typecasts
Marek Vasut
marek.vasut at mailbox.org
Sun Mar 17 18:05:15 CET 2024
On 3/17/24 12:26 PM, Laurent Pinchart wrote:
> Hi Marek,
>
> Thank you for the patch.
>
> On Sun, Mar 17, 2024 at 07:16:30AM +0100, Marek Vasut wrote:
>> The lmb_alloc_base() returns phys_addr_t , map_sysmem() accepts
>> phys_addr_t as first parameter. Declare $addr as phys_addr_t and
>
> s/$addr/addr/ ?
>
>> get rid of the casts.
>>
>> Reported-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
>> ---
>> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>
>> Cc: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
>> Cc: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
>> Cc: Simon Glass <sjg at chromium.org>
>> Cc: Tom Rini <trini at konsulko.com>
>> ---
>> boot/image-fdt.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/boot/image-fdt.c b/boot/image-fdt.c
>> index c2571b22244..c37442c9130 100644
>> --- a/boot/image-fdt.c
>> +++ b/boot/image-fdt.c
>> @@ -162,6 +162,7 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
>> void *of_start = NULL;
>> phys_addr_t start, size, usable;
>> char *fdt_high;
>> + phys_addr_t addr;
>> phys_addr_t low;
>> phys_size_t mapsize;
>> ulong of_len = 0;
>> @@ -186,7 +187,6 @@ int boot_relocate_fdt(struct lmb *lmb, char **of_flat_tree, ulong *of_size)
>> fdt_high = env_get("fdt_high");
>> if (fdt_high) {
>> ulong desired_addr = hextoul(fdt_high, NULL);
>> - ulong addr;
>
> I would keep addr declared here. With that,
I already replied to Heinrich on both parts, let's continue the
discussion there.
More information about the U-Boot
mailing list