mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-21 22:51:37 +00:00
env_nand: remove unused variable.
Remove an unused "total" variable in multiple functions. Signed-off-by: Guennadi Liakhovetski <lg@denx.de> Signed-off-by: Scott Wood <scottwood@freescale.com>
This commit is contained in:
parent
154b5484ac
commit
d27bc728cf
1 changed files with 0 additions and 10 deletions
|
@ -103,12 +103,9 @@ uchar env_get_char_spec (int index)
|
||||||
int env_init(void)
|
int env_init(void)
|
||||||
{
|
{
|
||||||
#if defined(ENV_IS_EMBEDDED)
|
#if defined(ENV_IS_EMBEDDED)
|
||||||
size_t total;
|
|
||||||
int crc1_ok = 0, crc2_ok = 0;
|
int crc1_ok = 0, crc2_ok = 0;
|
||||||
env_t *tmp_env1, *tmp_env2;
|
env_t *tmp_env1, *tmp_env2;
|
||||||
|
|
||||||
total = CONFIG_ENV_SIZE;
|
|
||||||
|
|
||||||
tmp_env1 = env_ptr;
|
tmp_env1 = env_ptr;
|
||||||
tmp_env2 = (env_t *)((ulong)env_ptr + CONFIG_ENV_SIZE);
|
tmp_env2 = (env_t *)((ulong)env_ptr + CONFIG_ENV_SIZE);
|
||||||
|
|
||||||
|
@ -183,12 +180,10 @@ int writeenv(size_t offset, u_char *buf)
|
||||||
#ifdef CONFIG_ENV_OFFSET_REDUND
|
#ifdef CONFIG_ENV_OFFSET_REDUND
|
||||||
int saveenv(void)
|
int saveenv(void)
|
||||||
{
|
{
|
||||||
size_t total;
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
nand_erase_options_t nand_erase_options;
|
nand_erase_options_t nand_erase_options;
|
||||||
|
|
||||||
env_ptr->flags++;
|
env_ptr->flags++;
|
||||||
total = CONFIG_ENV_SIZE;
|
|
||||||
|
|
||||||
nand_erase_options.length = CONFIG_ENV_RANGE;
|
nand_erase_options.length = CONFIG_ENV_RANGE;
|
||||||
nand_erase_options.quiet = 0;
|
nand_erase_options.quiet = 0;
|
||||||
|
@ -226,7 +221,6 @@ int saveenv(void)
|
||||||
#else /* ! CONFIG_ENV_OFFSET_REDUND */
|
#else /* ! CONFIG_ENV_OFFSET_REDUND */
|
||||||
int saveenv(void)
|
int saveenv(void)
|
||||||
{
|
{
|
||||||
size_t total;
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
nand_erase_options_t nand_erase_options;
|
nand_erase_options_t nand_erase_options;
|
||||||
|
|
||||||
|
@ -243,7 +237,6 @@ int saveenv(void)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
puts ("Writing to Nand... ");
|
puts ("Writing to Nand... ");
|
||||||
total = CONFIG_ENV_SIZE;
|
|
||||||
if (writeenv(CONFIG_ENV_OFFSET, (u_char *) env_ptr)) {
|
if (writeenv(CONFIG_ENV_OFFSET, (u_char *) env_ptr)) {
|
||||||
puts("FAILED!\n");
|
puts("FAILED!\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -287,12 +280,9 @@ int readenv (size_t offset, u_char * buf)
|
||||||
void env_relocate_spec (void)
|
void env_relocate_spec (void)
|
||||||
{
|
{
|
||||||
#if !defined(ENV_IS_EMBEDDED)
|
#if !defined(ENV_IS_EMBEDDED)
|
||||||
size_t total;
|
|
||||||
int crc1_ok = 0, crc2_ok = 0;
|
int crc1_ok = 0, crc2_ok = 0;
|
||||||
env_t *tmp_env1, *tmp_env2;
|
env_t *tmp_env1, *tmp_env2;
|
||||||
|
|
||||||
total = CONFIG_ENV_SIZE;
|
|
||||||
|
|
||||||
tmp_env1 = (env_t *) malloc(CONFIG_ENV_SIZE);
|
tmp_env1 = (env_t *) malloc(CONFIG_ENV_SIZE);
|
||||||
tmp_env2 = (env_t *) malloc(CONFIG_ENV_SIZE);
|
tmp_env2 = (env_t *) malloc(CONFIG_ENV_SIZE);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue