diff mbox series

[v3,06/14] env: the ops driver load becomes mandatory in struct env_driver

Message ID 20200625075958.9868-7-patrick.delaunay@st.com
State Changes Requested
Delegated to: Tom Rini
Headers show
Series env: ext4: corrections and add test for env in ext4 | expand

Commit Message

Patrick Delaunay June 25, 2020, 7:59 a.m. UTC
The ops driver load becomes mandatory in struct env_drive,
change the comment for this ops and remove unnecessary test.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---

Changes in v3:
- new: load operation becomes mandatory

 env/env.c              | 3 ---
 include/env_internal.h | 3 +--
 2 files changed, 1 insertion(+), 5 deletions(-)

Comments

Tom Rini June 26, 2020, 8:55 p.m. UTC | #1
On Thu, Jun 25, 2020 at 09:59:50AM +0200, Patrick Delaunay wrote:

> The ops driver load becomes mandatory in struct env_drive,
> change the comment for this ops and remove unnecessary test.
> 
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/env/env.c b/env/env.c
index 181aaa222c..a1696cd77e 100644
--- a/env/env.c
+++ b/env/env.c
@@ -187,9 +187,6 @@  int env_load(void)
 	for (prio = 0; (drv = env_driver_lookup(ENVOP_LOAD, prio)); prio++) {
 		int ret;
 
-		if (!drv->load)
-			continue;
-
 		if (!env_has_inited(drv->location))
 			continue;
 
diff --git a/include/env_internal.h b/include/env_internal.h
index 66550434c3..795941daee 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -154,8 +154,7 @@  struct env_driver {
 	/**
 	 * load() - Load the environment from storage
 	 *
-	 * This method is optional. If not provided, no environment will be
-	 * loaded.
+	 * This method is required for loading environment
 	 *
 	 * @return 0 if OK, -ve on error
 	 */