[PATCH v2 2/8] spl: fit: Factor out FIT parsing and use a context struct

Simon Glass sjg at chromium.org
Tue Dec 29 04:32:20 CET 2020


On Tue, 22 Dec 2020 at 16:54, Alexandru Gagniuc <mr.nuke.me at gmail.com> wrote:
>
> 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 at gmail.com>
> ---
>  common/spl/spl_fit.c | 90 +++++++++++++++++++++++++++++---------------
>  1 file changed, 60 insertions(+), 30 deletions(-)

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


More information about the U-Boot mailing list