[PATCH 4/4] make env_entry::callback conditional on !CONFIG_SPL_BUILD

Tom Rini trini at konsulko.com
Fri Apr 24 19:09:10 CEST 2020


On Thu, Feb 27, 2020 at 01:56:12PM +0000, Rasmus Villemoes wrote:

> The callback member of struct env_entry is always NULL for an SPL
> build. Removing it thus saves a bit of run-time memory in the
> SPL (when CONFIG_SPL_ENV_SUPPORT=y) since struct env_entry is embedded
> in struct env_entry_node - i.e. about 2KB for the normal case of
> 512+change hash table entries.
> 
> Two small fixups are needed for this, all other references to the
> callback member are already under !CONFIG_SPL_BUILD: Don't initialize
> .callback in set_flags() - hsearch_r doesn't use that value
> anyway. And make env_callback_init() initialize ->callback to NULL for
> a new entry instead of relying on an unused or deleted entry having
> NULL in ->callback.
> 
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> Reviewed-by: Simon Glass <sjg at chromium.org>

Applied to u-boot/master, thanks!

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


More information about the U-Boot mailing list