public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Patrick Delaunay <patrick.delaunay@st.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 1/3] env: correct the check of env_flags_validate presence
Date: Thu, 3 Oct 2019 09:24:26 +0200	[thread overview]
Message-ID: <20191003072428.19197-2-patrick.delaunay@st.com> (raw)
In-Reply-To: <20191003072428.19197-1-patrick.delaunay@st.com>

This patch corrects the check of env_flags_validate presence because
"flags.c" is always compiled in U-Boot and CONFIG_ENV_SUPPORT
don't exist; so the macro CONFIG_IS_ENABLED(ENV_SUPPORT) only provides
the expected result for SPL and TPL (check activation of
CONFIG_SPL_ENV_SUPPORT and CONFIG_TPL_ENV_SUPPORT).

This patch solves the regression introduced by
commit 7d4776545b0f ("env: solve compilation error
in SPL"); change_ok was always NULL in U-Boot.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 env/common.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/env/common.c b/env/common.c
index 3fb60509dd..f677b5b0da 100644
--- a/env/common.c
+++ b/env/common.c
@@ -24,8 +24,10 @@ DECLARE_GLOBAL_DATA_PTR;
 #include <env_default.h>
 
 struct hsearch_data env_htab = {
-#if CONFIG_IS_ENABLED(ENV_SUPPORT)
-	/* defined in flags.c, only compile with ENV_SUPPORT */
+#if !defined(CONFIG_SPL_BUILD) || CONFIG_IS_ENABLED(ENV_SUPPORT)
+	/* defined in flags.c, only compiled in U-Boot or
+	 * with $(SPL_TPL_)ENV_SUPPORT
+	 */
 	.change_ok = env_flags_validate,
 #endif
 };
-- 
2.17.1

  reply	other threads:[~2019-10-03  7:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-03  7:24 [U-Boot] [PATCH v4 0/3] env: Add CONFIG_ENV_FULL_SUPPORT Patrick Delaunay
2019-10-03  7:24 ` Patrick Delaunay [this message]
2019-10-03 13:18   ` [U-Boot] [PATCH v4 1/3] env: correct the check of env_flags_validate presence Tom Rini
2019-10-03  7:24 ` [U-Boot] [PATCH v4 2/3] env: introduce macro ENV_IS_IN_SOMEWHERE Patrick Delaunay
2020-03-18 16:03   ` Patrick DELAUNAY
2019-10-03  7:24 ` [U-Boot] [PATCH v4 3/3] env: Add CONFIG_ENV_FULL_SUPPORT Patrick Delaunay
2020-03-18 16:06   ` Patrick DELAUNAY
2019-10-07 17:56 ` [U-Boot] [PATCH v4 0/3] " Wolfgang Denk
2019-10-07 22:36   ` Tom Rini
2019-10-08 11:09     ` Wolfgang Denk
2019-10-14 14:46   ` Patrick DELAUNAY
2019-10-15  9:28     ` Wolfgang Denk

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=20191003072428.19197-2-patrick.delaunay@st.com \
    --to=patrick.delaunay@st.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