public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [PATCH 4/4] make env_entry::callback conditional on !CONFIG_SPL_BUILD
Date: Fri, 24 Apr 2020 13:09:10 -0400	[thread overview]
Message-ID: <20200424170910.GD4555@bill-the-cat> (raw)
In-Reply-To: <20200227135600.28853-5-rasmus.villemoes@prevas.dk>

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@prevas.dk>
> Reviewed-by: Simon Glass <sjg@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>

      parent reply	other threads:[~2020-04-24 17:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-27 13:56 [PATCH 0/4] remove (more) env callback code for SPL Rasmus Villemoes
2020-02-27 13:56 ` [PATCH 1/4] env: remove callback.o for an SPL build Rasmus Villemoes
2020-02-27 23:40   ` Simon Glass
2020-04-24 17:08   ` Tom Rini
2020-02-27 13:56 ` [PATCH 2/4] lib/hashtable.c: create helper for calling env_entry::callback Rasmus Villemoes
2020-02-27 23:40   ` Simon Glass
2020-04-24 17:08   ` Tom Rini
2020-02-27 13:56 ` [PATCH 3/4] lib/hashtable.c: don't test ->callback in SPL Rasmus Villemoes
2020-02-27 23:40   ` Simon Glass
2020-04-24 17:08   ` Tom Rini
2020-02-27 13:56 ` [PATCH 4/4] make env_entry::callback conditional on !CONFIG_SPL_BUILD Rasmus Villemoes
2020-02-27 23:40   ` Simon Glass
2020-04-24 17:09   ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200424170910.GD4555@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox