From: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Date: Thu, 27 Feb 2020 13:56:11 +0000 (+0000)
Subject: lib/hashtable.c: don't test ->callback in SPL
X-Git-Tag: v2025.01-rc5-pxa1908~2461^2~33
X-Git-Url: http://git.dujemihanovic.xyz/%22mailto:Murray.Jensen%40csiro.au/static/%7B%7B?a=commitdiff_plain;h=34284970a1736e7be35bef74e4f8e429e703c1ce;p=u-boot.git

lib/hashtable.c: don't test ->callback in SPL

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

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;
 }