From patchwork Thu Feb 27 13:56:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 236951 List-Id: U-Boot discussion From: rasmus.villemoes at prevas.dk (Rasmus Villemoes) Date: Thu, 27 Feb 2020 13:56:11 +0000 Subject: [PATCH 3/4] lib/hashtable.c: don't test ->callback in SPL In-Reply-To: <20200227135600.28853-1-rasmus.villemoes@prevas.dk> References: <20200227135600.28853-1-rasmus.villemoes@prevas.dk> Message-ID: <20200227135600.28853-4-rasmus.villemoes@prevas.dk> In SPL, environment callbacks are not supported, so e->callback is always NULL. Removing this makes the SPL a little smaller (about 400 bytes in my ppc build) with no functional change. Signed-off-by: Rasmus Villemoes Reviewed-by: Simon Glass --- lib/hashtable.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/hashtable.c b/lib/hashtable.c index 574ec6af86..c4e1e2bd45 100644 --- a/lib/hashtable.c +++ b/lib/hashtable.c @@ -226,8 +226,10 @@ static int do_callback(const struct env_entry *e, const char *name, const char *value, enum env_op op, int flags) { +#ifndef CONFIG_SPL_BUILD if (e->callback) return e->callback(name, value, op, flags); +#endif return 0; }