From mboxrd@z Thu Jan 1 00:00:00 1970 From: Patrick Delaunay Date: Tue, 28 Jul 2020 11:51:19 +0200 Subject: [PATCH v4 06/14] env: the ops driver load becomes mandatory in struct env_driver In-Reply-To: <20200728095128.2363-1-patrick.delaunay@st.com> References: <20200728095128.2363-1-patrick.delaunay@st.com> Message-ID: <20200728095128.2363-7-patrick.delaunay@st.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- (no changes since v3) Changes in v3: - new: load operation becomes mandatory env/env.c | 3 --- include/env_internal.h | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/env/env.c b/env/env.c index bcc68c6bce..5cf5bd238f 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 */ -- 2.17.1