From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Goldschmidt Date: Tue, 30 Jan 2018 09:12:41 +0100 Subject: [U-Boot] [PATCH v3 13/15] env: Mark env_get_location as weak In-Reply-To: References: Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 23.01.2018 21:17, Maxime Ripard wrote: > Allow boards and architectures to override the default environment lookup > code by overriding env_get_location. Sorry for missing that conversation a bit, but is it really enough to override env_get_location? Overriding this function should make the env_locations array unused, but env_set_inited still references it. Regards, Simon > > Reviewed-by: Andre Przywara > Reviewed-by: Lukasz Majewski > Reviewed-by: Simon Glass > Signed-off-by: Maxime Ripard > --- > env/env.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/env/env.c b/env/env.c > index 2ea581cbedd6..9564522e76a5 100644 > --- a/env/env.c > +++ b/env/env.c > @@ -85,6 +85,7 @@ static void env_set_inited(enum env_location location) > * highest priority > * > * This will return the preferred environment for the given priority. > + * This is overridable by boards if they need to. > * > * All implementations are free to use the operation, the priority and > * any other data relevant to their choice, but must take into account > @@ -95,7 +96,7 @@ static void env_set_inited(enum env_location location) > * Returns: > * an enum env_location value on success, a negative error code otherwise > */ > -static enum env_location env_get_location(enum env_operation op, int prio) > +__weak enum env_location env_get_location(enum env_operation op, int prio) > { > switch (op) { > case ENVOP_GET_CHAR: