
-----Original Message----- From: York Sun Sent: Friday, October 26, 2018 8:01 PM To: Rajesh Bhagat rajesh.bhagat@nxp.com; u-boot@lists.denx.de Cc: Prabhakar Kushwaha prabhakar.kushwaha@nxp.com Subject: Re: [PATCH v4 02/27] env: allow flash and nand env driver to compile together
On 10/12/18 07:45, Rajesh Bhagat wrote:
Define env_ptr as static in flash and nand env driver to allow these to compile together.
Signed-off-by: Rajesh Bhagat rajesh.bhagat@nxp.com
Change in v4: None
Change in v3:
- Merged env nand specific patches to remove compilation warning
Change in v2: None
env/flash.c | 4 ++-- env/nand.c | 6 ++---- include/environment.h | 1 - 3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/env/flash.c b/env/flash.c index 32236c716e..33b199f05b 100644 --- a/env/flash.c +++ b/env/flash.c @@ -45,13 +45,13 @@ DECLARE_GLOBAL_DATA_PTR; #endif
#ifdef ENV_IS_EMBEDDED -env_t *env_ptr = &environment; +static env_t *env_ptr = &environment;
static __maybe_unused env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR;
#else /* ! ENV_IS_EMBEDDED */
-env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; +static env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; static __maybe_unused env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR; #endif /* ENV_IS_EMBEDDED */
Compiling warning env_ptr defined but not used for boards mccmon6_sd and mccmon6_nor. Please check.
Hi York,
Thanks for pointing it out. Let me check this.
- Rajesh
York