[PATCH 01/13] boot: Split out the first part of fit_image_load()

Tom Rini trini at konsulko.com
Wed Apr 8 18:25:43 CEST 2026


On Wed, Mar 25, 2026 at 10:54:10AM -0600, Simon Glass wrote:

> This function is over 250 lines long. Split out the image-selection
> part into a new select_image() function which handles format checking,
> configuration selection and image-node lookup.
> 
> Take care to only call fit_get_name() when a valid node is found, since
> libfdt does not handle negative offsets gracefully.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>

Function length isn't a problem in and of itself, especially when we
aren't pulling out some 4 or 5 level deep nested logic to improve
readability.

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


More information about the U-Boot mailing list