summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-03-23 13:51:05 -0600
committerTom Rini <[email protected]>2026-04-07 11:30:41 -0600
commit8af4e124875932567cea627e04f26cf5cc529e25 (patch)
tree5d68dfb50faac6798764d370618c79408d644a53 /env
parent93f84ee022a8401421cdaab84fe7d106d83fdb4a (diff)
env: Make more use of the ENV_SAVE_PTR macro
With commit 82b2f4135719 ("env_internal.h: add alternative ENV_SAVE_PTR macro") we introduced the ENV_SAVE_PTR macro but as explained in the commit message, left full conversion for a later time. This commit makes more progress on that front by doing the remaining easy conversions to the new macro. Signed-off-by: Tom Rini <[email protected]> Changes in v2: - Reduce the number of conversions, some didn't work as expected once CMD_SAVEENV was actually disabled. - Finish converting UBI Cc Rasmus Villemoes <[email protected]>
Diffstat (limited to 'env')
-rw-r--r--env/eeprom.c2
-rw-r--r--env/nvram.c2
-rw-r--r--env/onenand.c2
-rw-r--r--env/scsi.c4
-rw-r--r--env/ubi.c4
5 files changed, 5 insertions, 9 deletions
diff --git a/env/eeprom.c b/env/eeprom.c
index b290b1013e1..f4cc2909376 100644
--- a/env/eeprom.c
+++ b/env/eeprom.c
@@ -175,5 +175,5 @@ U_BOOT_ENV_LOCATION(eeprom) = {
.location = ENVL_EEPROM,
ENV_NAME("EEPROM")
.load = env_eeprom_load,
- .save = env_save_ptr(env_eeprom_save),
+ .save = ENV_SAVE_PTR(env_eeprom_save),
};
diff --git a/env/nvram.c b/env/nvram.c
index d49cd0f337a..18f0a0aa1fb 100644
--- a/env/nvram.c
+++ b/env/nvram.c
@@ -65,6 +65,6 @@ U_BOOT_ENV_LOCATION(nvram) = {
.location = ENVL_NVRAM,
ENV_NAME("NVRAM")
.load = env_nvram_load,
- .save = env_save_ptr(env_nvram_save),
+ .save = ENV_SAVE_PTR(env_nvram_save),
.init = env_nvram_init,
};
diff --git a/env/onenand.c b/env/onenand.c
index 8c349ef5ce6..59b523e06c6 100644
--- a/env/onenand.c
+++ b/env/onenand.c
@@ -107,5 +107,5 @@ U_BOOT_ENV_LOCATION(onenand) = {
.location = ENVL_ONENAND,
ENV_NAME("OneNAND")
.load = env_onenand_load,
- .save = env_save_ptr(env_onenand_save),
+ .save = ENV_SAVE_PTR(env_onenand_save),
};
diff --git a/env/scsi.c b/env/scsi.c
index 207717e17b1..e56891a9899 100644
--- a/env/scsi.c
+++ b/env/scsi.c
@@ -108,8 +108,6 @@ U_BOOT_ENV_LOCATION(scsi) = {
.location = ENVL_SCSI,
ENV_NAME("SCSI")
.load = env_scsi_load,
-#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_XPL_BUILD)
- .save = env_save_ptr(env_scsi_save),
+ .save = ENV_SAVE_PTR(env_scsi_save),
.erase = ENV_ERASE_PTR(env_scsi_erase),
-#endif
};
diff --git a/env/ubi.c b/env/ubi.c
index 59bd96feb48..e9865b45ebc 100644
--- a/env/ubi.c
+++ b/env/ubi.c
@@ -33,7 +33,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define ENV_UBI_VOLUME_REDUND "invalid"
#endif
-#ifdef CONFIG_CMD_SAVEENV
#ifdef CONFIG_ENV_REDUNDANT
static int env_ubi_save(void)
{
@@ -103,7 +102,6 @@ static int env_ubi_save(void)
return 0;
}
#endif /* CONFIG_ENV_REDUNDANT */
-#endif /* CONFIG_CMD_SAVEENV */
#ifdef CONFIG_ENV_REDUNDANT
static int env_ubi_load(void)
@@ -219,6 +217,6 @@ U_BOOT_ENV_LOCATION(ubi) = {
.location = ENVL_UBI,
ENV_NAME("UBI")
.load = env_ubi_load,
- .save = env_save_ptr(env_ubi_save),
+ .save = ENV_SAVE_PTR(env_ubi_save),
.erase = ENV_ERASE_PTR(env_ubi_erase),
};