]> git.baikalelectronics.ru Git - uboot.git/commit
spl: fit: Factor out FIT parsing and use a context struct
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>
Wed, 20 Jan 2021 16:46:50 +0000 (10:46 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 17 Feb 2021 22:12:45 +0000 (17:12 -0500)
commit9a3b126ef3dd947ee57ef3640eaad56e5589692e
treedd2eee300e2fb0c6bb8ef237135cbea4f76cab21
parent3958b8c795565d1723e8d81fc37786fc895d9b4a
spl: fit: Factor out FIT parsing and use a context struct

The logical steps in spl_load_simple_fit() are difficult to follow.
I think the long comments, ifdefs, and ungodly number of variables
seriously affect the readability. In particular, it violates section 6
of the coding style, paragraphs (3), and (4).

The purpose of this patch is to improve the situation by
  - Factoring out initialization and parsing to separate functions
  - Reduce the number of variables by using a context structure
This change introduces no functional changes.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/spl/spl_fit.c