[PATCH v6 05/25] spl: Remove NULL assignments in spl_load_info

Simon Glass sjg at chromium.org
Wed Nov 8 05:23:39 CET 2023


Hi Sean,

On Sun, 5 Nov 2023 at 19:26, Sean Anderson <seanga2 at gmail.com> wrote:
>
> Remove NULL assignments to fields in spl_load_info when .load doesn't
> reference these fields. This can result in more efficient code. filename
> must stay even if it is unused, since load_simple_fit uses it.
>
> Signed-off-by: Sean Anderson <seanga2 at gmail.com>
> ---
>
> Changes in v6:
> - New
>
>  arch/arm/mach-sunxi/spl_spi_sunxi.c | 2 --
>  common/spl/spl_fat.c                | 1 -
>  common/spl/spl_mmc.c                | 2 --
>  common/spl/spl_nand.c               | 4 ----
>  common/spl/spl_spi.c                | 2 --
>  common/spl/spl_ymodem.c             | 1 -
>  6 files changed, 12 deletions(-)

This makes me wonder if we should have a function to clear it out
(using memset() and perhaps a bl_len parameter)? Having said that, the
info-field use is pretty self-contained with these files.

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


More information about the U-Boot mailing list