[PATCH 4/8] spl: fit: Remove useless loop in spl_fit_get_image_name()

Simon Glass sjg at chromium.org
Sat Dec 19 03:29:01 CET 2020


On Tue, 15 Dec 2020 at 17:10, Alexandru Gagniuc <mr.nuke.me at gmail.com> wrote:
>
> When a desired configuration is not found, conf_node will have a
> negative value. Thus the for loop will start at the root "/" node of
> the image, print the "/description" property, and stop.
>
> It appears the intent of the loop was to print the names of the
> subnodes under "/configurations". We would need the offset to the
> "/configurations" node, which is abstracted by fit_find_config_node().
>
> This change agrees that abstracting the node offset is the correct
> design, and we shouldn't be parsing the configurations manually. Thus
> the loop in spl_fit_get_image_name() is useless. Remove it.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
> ---
>  common/spl/spl_fit.c | 12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list