Re: [U-Boot] [PATCH] env: Correct case of no sub-init function
On 19 August 2017 at 20:27, Tom Riniwrote: > > With the change to the environment code to remove the common init stage > of pointing to the default environment and setting it as valid, combined > with the change to switch gd->env_valid from 0/1/2 to an enum we now > must set env_valid to one of the enum values rather than an int. And in > this case, not only was setting it to an int wrong, it was now the wrong > value. > > Fixes: 7938822a6b75 ("env: Drop common init() functions") > Reported-by: Marek Vasut > Reported-by: Andy Shevchenko > Signed-off-by: Tom Rini > --- > env/env.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Simon Glass (I sent a similar patch just now after my build completed, but please ignore it) ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot
[U-Boot] [PATCH] env: Correct case of no sub-init function
With the change to the environment code to remove the common init stage of pointing to the default environment and setting it as valid, combined with the change to switch gd->env_valid from 0/1/2 to an enum we now must set env_valid to one of the enum values rather than an int. And in this case, not only was setting it to an int wrong, it was now the wrong value. Fixes: 7938822a6b75 ("env: Drop common init() functions") Reported-by: Marek VasutReported-by: Andy Shevchenko Signed-off-by: Tom Rini --- env/env.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/env/env.c b/env/env.c index 2b8b9611cfff..8671f13f8d9e 100644 --- a/env/env.c +++ b/env/env.c @@ -138,7 +138,7 @@ int env_init(void) ret = drv->init(); if (ret == -ENOENT) { gd->env_addr = (ulong)_environment[0]; - gd->env_valid = 0; + gd->env_valid = ENV_VALID; return 0; } else if (ret) { -- 1.9.1 ___ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot