env: Drop unused env_ptr variables
This variable is declared as a global in most environment location drivers. But it is not used outside the drivers and most of the declarations are unnecessary. Also some drivers call free() on env_ptr which seems wrong since it is not in the heap. Drop the variable where possible, and all calls to free(). Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
1
env/nvram.c
vendored
1
env/nvram.c
vendored
@@ -36,7 +36,6 @@ DECLARE_GLOBAL_DATA_PTR;
|
||||
#ifdef CONFIG_SYS_NVRAM_ACCESS_ROUTINE
|
||||
extern void *nvram_read(void *dest, const long src, size_t count);
|
||||
extern void nvram_write(long dest, const void *src, size_t count);
|
||||
env_t *env_ptr;
|
||||
#else
|
||||
env_t *env_ptr = (env_t *)CONFIG_ENV_ADDR;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user