global_data: Remove environment members if not used

If the environment is not enabled we don't need these fields in
global_data. Make them conditional.

Make these fields conditional. Move env_buf up one so it can share
an #ifdef.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2024-08-21 10:19:25 -06:00
committed by Tom Rini
parent d990210702
commit 66ca5b7864
3 changed files with 17 additions and 5 deletions

View File

@@ -44,7 +44,9 @@ int main(void)
DEFINE(GD_NEW_GD, offsetof(struct global_data, new_gd));
#if CONFIG_IS_ENABLED(ENV_SUPPORT)
DEFINE(GD_ENV_ADDR, offsetof(struct global_data, env_addr));
#endif
return 0;
}