[PATCH 01/16] lib: fdtdec: Handle multiple memory nodes

Heinrich Schuchardt xypron.glpk at gmx.de
Wed Jun 12 07:55:47 CEST 2024



Am 11. Juni 2024 20:51:55 MESZ schrieb Simon Glass <sjg at chromium.org>:
>Hi Jiaxun,
>
>On Tue, 11 Jun 2024 at 07:48, Jiaxun Yang <jiaxun.yang at flygoat.com> wrote:
>>
>>
>>
>> 在2024年6月11日六月 下午1:26,Heinrich Schuchardt写道:
>> Hi Heinrich,
>>
>> Thanks for your comments, will fix most of them in next reversion.
>>
>> [...]
>> >> -            gd->bd->bi_dram[bank].start = (phys_addr_t)res.start;
>> >
>> > The conversion is superfluous.
>>
>> This is necessary as phys_addr_t can be unsigned long or unsigned long long.

In C++ you would get an error.
In C an assignment to an integer type of different size does not lead to a warning.

Best regards

Heinrich


>>
>> >
>> [...]
>> >> +    __maybe_unused const char *final_name;
>> >> +    __maybe_unused int final_reg;
>> >
>> > '__maybe_unused' is superfluous.
>>
>> This is necessary as when LOG_DEBUG is disabled these two variables won't
>> be referenced. Compilers would complain about it.
>>
>> >
>> >>
>> >>      gd->ram_base = (unsigned long)~0;
>> >
>> > gd->ram_base = ULONG_MAX;
>> >
>> >>
>> [...]
>>
>> Thanks
>> --
>
>Can you please add a test for this function? Perhaps test/dm/fdtdec.c
>might be a good place?
>
>Regards,
>Simon
>
>> - Jiaxun


More information about the U-Boot mailing list