All of lore.kernel.org
 help / color / mirror / Atom feed
From: York Sun <york.sun@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v6 02/27] env: allow flash and nand env driver to compile together
Date: Mon, 3 Dec 2018 18:14:48 +0000	[thread overview]
Message-ID: <AM0PR04MB3971A5CD68F508233D4A62FD9AAE0@AM0PR04MB3971.eurprd04.prod.outlook.com> (raw)
In-Reply-To: 20181105181931.7348-3-rajesh.bhagat@nxp.com

Maintainers,

Please review this patch as it slightly changes common code for ENV.

Rajesh,

If you run get_maintainers, or use patman, you would have expanded the
CC list.

York

On 11/5/18 10:01 AM, 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 v6: None
> 
> Change in v5:
>  - Solved compilation warning for boards mccmon6_sd and mccmon6_nor
>  
> Change in v4: None
> 
> Change in v3:
>  - Merged env nand specific patches to remove compilation warning
> 
> Change in v2: None
> 
> 
> 
>  env/flash.c           | 12 ++++++------
>  env/nand.c            |  6 ++----
>  include/environment.h |  1 -
>  3 files changed, 8 insertions(+), 11 deletions(-)
> 
> diff --git a/env/flash.c b/env/flash.c
> index 32236c716e..dca6567a09 100644
> --- a/env/flash.c
> +++ b/env/flash.c
> @@ -44,16 +44,16 @@ DECLARE_GLOBAL_DATA_PTR;
>  #define INITENV
>  #endif
>  
> +#if defined(CONFIG_ENV_ADDR_REDUND) && defined(CMD_SAVEENV) || \
> +	!defined(CONFIG_ENV_ADDR_REDUND) && defined(INITENV)
>  #ifdef ENV_IS_EMBEDDED
> -env_t *env_ptr = &environment;
> -
> -static __maybe_unused env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR;
> -
> +static env_t *env_ptr = &environment;
>  #else /* ! ENV_IS_EMBEDDED */
>  
> -env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
> -static __maybe_unused env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR;
> +static env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
>  #endif /* ENV_IS_EMBEDDED */
> +#endif
> +static __maybe_unused env_t *flash_addr = (env_t *)CONFIG_ENV_ADDR;
>  
>  /* CONFIG_ENV_ADDR is supposed to be on sector boundary */
>  static ulong __maybe_unused end_addr =
> diff --git a/env/nand.c b/env/nand.c
> index 3698e68957..29eda66fad 100644
> --- a/env/nand.c
> +++ b/env/nand.c
> @@ -40,11 +40,9 @@
>  #endif
>  
>  #if defined(ENV_IS_EMBEDDED)
> -env_t *env_ptr = &environment;
> +static env_t *env_ptr = &environment;
>  #elif defined(CONFIG_NAND_ENV_DST)
> -env_t *env_ptr = (env_t *)CONFIG_NAND_ENV_DST;
> -#else /* ! ENV_IS_EMBEDDED */
> -env_t *env_ptr;
> +static env_t *env_ptr = (env_t *)CONFIG_NAND_ENV_DST;
>  #endif /* ENV_IS_EMBEDDED */
>  
>  DECLARE_GLOBAL_DATA_PTR;
> diff --git a/include/environment.h b/include/environment.h
> index 5e90f157e8..7da1291d5b 100644
> --- a/include/environment.h
> +++ b/include/environment.h
> @@ -157,7 +157,6 @@ extern env_t environment;
>  #endif /* ENV_IS_EMBEDDED */
>  
>  extern const unsigned char default_environment[];
> -extern env_t *env_ptr;
>  
>  #if defined(CONFIG_NEEDS_MANUAL_RELOC)
>  extern void env_reloc(void);
> 

  reply	other threads:[~2018-12-03 18:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-05 18:01 [U-Boot] [PATCH v6 00/27] TF-A Boot support for NXP Chassis 2 platforms Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 01/27] move data structure out of cpu.h Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 02/27] env: allow flash and nand env driver to compile together Rajesh Bhagat
2018-12-03 18:14   ` York Sun [this message]
2018-11-05 18:01 ` [U-Boot] [PATCH v6 03/27] env: sf: define API to override sf environment address Rajesh Bhagat
2018-12-03 18:16   ` York Sun
2018-11-05 18:01 ` [U-Boot] [PATCH v6 04/27] driver/ifc: replace __ilog2 with LOG2 macro Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 05/27] armv8: layerscape: Enable routing SError exception Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 06/27] armv8: fsl-layerscape: change tlb base from OCRAM to DDR in EL < 3 Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 07/27] drivers: ifc: dynamic chipselect mapping support Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 08/27] armv8: layerscape: Add TFABOOT support Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 09/27] armv8: fsl-layerscape: identify boot source from PORSR register Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 10/27] armv8: layerscape: remove EL3 specific erratas for TFABOOT Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 11/27] armv8: fsl-layerscape: bootcmd identification " Rajesh Bhagat
2018-11-05 18:01 ` [U-Boot] [PATCH v6 12/27] armv8: layerscape: add SMC calls for DDR size and bank info Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 13/27] armv8: layerscape: skip OCRAM init for TFABOOT Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 14/27] armv8: fsl-layerscape: Update parsing boot source Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 15/27] armv8: sec_firmware: change el2_to_aarch32 SMC ID Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 16/27] armv8: sec_firmware: return job ring status as true in TFABOOT Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 17/27] net: fm: add TFABOOT support Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 18/27] drivers: qe: " Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 19/27] armv8: fsl-layerscape: add support of MC framework for TFA Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 20/27] armv8: ls1046ardb: Add TFABOOT support Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 21/27] armv8: ls1046aqds: " Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 22/27] armv8: ls1043ardb: " Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 23/27] armv8: ls1043aqds: " Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 24/27] armv8: ls1012ardb: " Rajesh Bhagat
2018-11-05 18:02 ` [U-Boot] [PATCH v6 25/27] armv8: ls1012aqds: fix secure boot compilation Rajesh Bhagat
2018-11-05 18:03 ` [U-Boot] [PATCH v6 26/27] armv8: ls1012aqds: Add TFABOOT support Rajesh Bhagat
2018-11-05 18:03 ` [U-Boot] [PATCH v6 27/27] armv8: ls1012afrx: " Rajesh Bhagat
2018-11-19 20:13 ` [U-Boot] [PATCH v6 00/27] TF-A Boot support for NXP Chassis 2 platforms York Sun
2018-12-10 21:05 ` York Sun

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=AM0PR04MB3971A5CD68F508233D4A62FD9AAE0@AM0PR04MB3971.eurprd04.prod.outlook.com \
    --to=york.sun@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.