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 <[email protected]>
Reviewed-by: Tom Rini <[email protected]> -- Tom
signature.asc
Description: PGP signature

