[PATCH] RFC: spl: fit: Use libfdt functions to read stringlist

Tom Rini trini at konsulko.com
Fri Feb 26 18:40:32 CET 2021


On Thu, Feb 25, 2021 at 02:31:23PM -0500, Simon Glass wrote:

> At present the code here reimplements a few libfdt functions and does not
> always respect the property length. The !str check is unlikely to fire
> since 1 is added to the string address. If strchr() returns NULL then the
> code produces (void*)1 instead. Also it might extend beyond the property
> value since strchr() does not have a maximum length.
> 
> In any case it does not seem worthwhile to implement the libfdt functions
> again, despite small code-size advantages. There is no function to return
> the count after a failed get, but we can call two functions. We could add
> one if code size is considered critical here.
> 
> Update the code to use libfdt directly.
> 
> For lion-rk3368 (aarch64) this adds 68 bytes of code.
> For am57xx_hs_evm (arm) it adds 134 bytes.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Reviewed-by: Tom Rini <trini at konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210226/28ed1538/attachment.sig>


More information about the U-Boot mailing list