[PATCH v10] core: fdtaddr: use map_sysmem() as cast for the return (part 2)

Johan Jonker jbx6244 at gmail.com
Thu May 11 10:03:28 CEST 2023



On 5/11/23 09:12, Kever Yang wrote:
> Hi Johan,
> 

>     The patch v9 has merged, it will be better to send a new patch if more change needed,

Merging logic with 2 maintainers...
This is a separate new patch for Simon.
He applied that (part 1) first, then the nfc serie was merged.
And now I must fix the lines that Simon removed to be complete.....

See comment:
https://lore.kernel.org/u-boot/11826a88-6d4a-20a1-0651-b7e2fe79cbe5@rock-chips.com/T/#mf603b1a5cdaa6612ff71674d76d4f7ff49c21a2a

Comment by Simon:
I had to drop the second hunk here since it conflicted and it looks
like it was already done upstream. Please take a look and send a
follow-up patch if needed.

Please have a look.

Johan

> 
> but not a v10 patch.
> 
> 
> Thanks,
> 
> - Kever
> 
> On 2023/5/11 05:48, Johan Jonker wrote:
>> For the devfdt_get_addr_size_index_ptr() function use
>> map_sysmem() function as cast for the return for use in
>> sandbox.
>>
>> Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
>> ---
>>   drivers/core/fdtaddr.c | 5 ++++-
>>   1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/core/fdtaddr.c b/drivers/core/fdtaddr.c
>> index 3b59b70c..546db675 100644
>> --- a/drivers/core/fdtaddr.c
>> +++ b/drivers/core/fdtaddr.c
>> @@ -131,7 +131,10 @@ void *devfdt_get_addr_size_index_ptr(const struct udevice *dev, int index,
>>   {
>>       fdt_addr_t addr = devfdt_get_addr_size_index(dev, index, size);
>>
>> -    return (addr == FDT_ADDR_T_NONE) ? NULL : (void *)(uintptr_t)addr;
>> +    if (addr == FDT_ADDR_T_NONE)
>> +        return NULL;
>> +
>> +    return map_sysmem(addr, 0);
>>   }
>>
>>   fdt_addr_t devfdt_get_addr_name(const struct udevice *dev, const char *name)
>> -- 
>> 2.20.1
>>


More information about the U-Boot mailing list