From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joakim Tjernlund Date: Mon, 3 Apr 2017 12:19:32 +0000 Subject: [U-Boot] Remove global variable env_t *env_ptr ? Message-ID: <1491221969.4177.81.camel@infinera.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de I am looking at adding support for runtime sizing of CONFIG_ENV_ADDR as we need to replace out flash but we don't want to create a new u-boot binairy just for this simple change. While converting env_flash.c I noted the global variable env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR; which cannot be runtime decided. Looking at users of this variable I only find one in pmc405de.c(not sure what that board is doing) and for what I can tell this variable is not correct for redundant env. either. Anyhow, I am faced wit two choices, either remove the env_ptr or convert it to a function call. What do fellow u-booters think about env_ptr? Jocke PS. Adding my work so far here: