mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
Fix problem with default #defines
Cleanup compiler warning
This commit is contained in:
parent
47cd00fa70
commit
500545cc6b
2 changed files with 13 additions and 4 deletions
|
@ -160,9 +160,11 @@ int env_init(void)
|
|||
#ifdef CMD_SAVEENV
|
||||
int saveenv(void)
|
||||
{
|
||||
int rc = 1;
|
||||
ulong up_data = 0;
|
||||
char *saved_data = NULL;
|
||||
int rc = 1;
|
||||
#if CFG_ENV_SECT_SIZE > CFG_ENV_SIZE
|
||||
ulong up_data = 0;
|
||||
#endif
|
||||
|
||||
debug ("Protect off %08lX ... %08lX\n",
|
||||
(ulong)flash_addr, end_addr);
|
||||
|
|
|
@ -47,8 +47,15 @@
|
|||
# if !defined(CFG_ENV_ADDR_REDUND) && defined(CFG_ENV_OFFSET_REDUND)
|
||||
# define CFG_ENV_ADDR_REDUND (CFG_FLASH_BASE + CFG_ENV_OFFSET_REDUND)
|
||||
# endif
|
||||
# ifndef CFG_ENV_SIZE
|
||||
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
|
||||
# if defined(CFG_ENV_SECT_SIZE) || defined(CFG_ENV_SIZE)
|
||||
# ifndef CFG_ENV_SECT_SIZE
|
||||
# define CFG_ENV_SECT_SIZE CFG_ENV_SIZE
|
||||
# endif
|
||||
# ifndef CFG_ENV_SIZE
|
||||
# define CFG_ENV_SIZE CFG_ENV_SECT_SIZE
|
||||
# endif
|
||||
# else
|
||||
# error "Both CFG_ENV_SECT_SIZE and CFG_ENV_SIZE undefined"
|
||||
# endif
|
||||
# if defined(CFG_ENV_ADDR_REDUND) && !defined(CFG_ENV_SIZE_REDUND)
|
||||
# define CFG_ENV_SIZE_REDUND CFG_ENV_SIZE
|
||||
|
|
Loading…
Reference in a new issue