From: "Pali Rohár" <pali@kernel.org>
To: Priyanka Jain <priyanka.jain@nxp.com>, Wolfgang Denk <wd@denx.de>
Cc: u-boot@lists.denx.de
Subject: [PATCH 1/3] hwconfig: Allow to compile it without env support
Date: Sun, 3 Apr 2022 00:24:25 +0200 [thread overview]
Message-ID: <20220402222427.19212-2-pali@kernel.org> (raw)
In-Reply-To: <20220402222427.19212-1-pali@kernel.org>
When env support is disabled then usage of env_get() generates linker
errors. So do not compile env_get() when env support is disabled (for
example when disabled only in SPL).
Signed-off-by: Pali Rohár <pali@kernel.org>
---
common/hwconfig.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/common/hwconfig.c b/common/hwconfig.c
index 63b3ccaf84e2..43566b81bd48 100644
--- a/common/hwconfig.c
+++ b/common/hwconfig.c
@@ -83,7 +83,9 @@ static const char *__hwconfig(const char *opt, size_t *arglen,
"and before environment is ready\n");
return NULL;
}
+#if CONFIG_IS_ENABLED(ENV_SUPPORT)
env_hwconfig = env_get("hwconfig");
+#endif
}
if (env_hwconfig) {
--
2.20.1
next prev parent reply other threads:[~2022-04-02 22:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-02 22:24 [PATCH 0/3] powerpc: p2020: Allow to compile it without env support Pali Rohár
2022-04-02 22:24 ` Pali Rohár [this message]
2022-04-02 22:24 ` [PATCH 2/3] ddr: fsl: " Pali Rohár
2022-04-02 22:24 ` [PATCH 3/3] board: freescale: p1_p2_rdb_pc: " Pali Rohár
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=20220402222427.19212-2-pali@kernel.org \
--to=pali@kernel.org \
--cc=priyanka.jain@nxp.com \
--cc=u-boot@lists.denx.de \
--cc=wd@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